mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Update ModuleBay instance name before saving it
This commit is contained in:
parent
f8022040b2
commit
b1ac20ac19
@ -1298,6 +1298,7 @@ class Module(PrimaryModel, ConfigContextModel):
|
|||||||
else:
|
else:
|
||||||
# ModuleBays must be saved individually for MPTT
|
# ModuleBays must be saved individually for MPTT
|
||||||
for instance in create_instances:
|
for instance in create_instances:
|
||||||
|
instance.name = instance.name.replace(MODULE_TOKEN, str(self.module_bay.position))
|
||||||
instance.save()
|
instance.save()
|
||||||
|
|
||||||
update_fields = ['module']
|
update_fields = ['module']
|
||||||
|
Loading…
Reference in New Issue
Block a user