mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
20738 update vc_position in delete not signal handler
This commit is contained in:
parent
264b40a269
commit
20af97ce24
@ -1169,7 +1169,7 @@ class VirtualChassis(PrimaryModel):
|
|||||||
|
|
||||||
# Clear vc_position and vc_priority on member devices BEFORE calling super().delete()
|
# Clear vc_position and vc_priority on member devices BEFORE calling super().delete()
|
||||||
# This must be done here because on_delete=SET_NULL executes before pre_delete signal
|
# This must be done here because on_delete=SET_NULL executes before pre_delete signal
|
||||||
for device in members_list:
|
for device in self.members.all():
|
||||||
device.vc_position = None
|
device.vc_position = None
|
||||||
device.vc_priority = None
|
device.vc_priority = None
|
||||||
device.save()
|
device.save()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user