mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 02:48:38 -06:00
Fixes #308: Update rack assignment for all child devices when moving a parent device
This commit is contained in:
parent
b5393ea3b3
commit
ce389551c9
@ -681,6 +681,9 @@ class Device(CreatedUpdatedModel):
|
||||
self.device_type.device_bay_templates.all()]
|
||||
)
|
||||
|
||||
# Update Rack assignment for any child Devices
|
||||
Device.objects.filter(parent_bay__device=self).update(rack=self.rack)
|
||||
|
||||
def to_csv(self):
|
||||
return ','.join([
|
||||
self.name or '',
|
||||
|
Loading…
Reference in New Issue
Block a user