mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Fixes #308: Update rack assignment for all child devices when moving a parent device
This commit is contained in:
parent
518af1b95c
commit
534e6ac19e
@ -681,6 +681,9 @@ class Device(CreatedUpdatedModel):
|
|||||||
self.device_type.device_bay_templates.all()]
|
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):
|
def to_csv(self):
|
||||||
return ','.join([
|
return ','.join([
|
||||||
self.name or '',
|
self.name or '',
|
||||||
|
Loading…
Reference in New Issue
Block a user