mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
Fix replication of module bays on new modules
This commit is contained in:
parent
399a2d6ad5
commit
a16ad7474b
@ -672,12 +672,12 @@ class ModuleBayTemplate(ModularComponentTemplateModel):
|
||||
verbose_name = _('module bay template')
|
||||
verbose_name_plural = _('module bay templates')
|
||||
|
||||
def instantiate(self, device):
|
||||
def instantiate(self, **kwargs):
|
||||
return self.component_model(
|
||||
device=device,
|
||||
name=self.name,
|
||||
label=self.label,
|
||||
position=self.position
|
||||
position=self.position,
|
||||
**kwargs
|
||||
)
|
||||
instantiate.do_not_call_in_templates = True
|
||||
|
||||
|
@ -1224,7 +1224,8 @@ class Module(PrimaryModel, ConfigContextModel):
|
||||
("powerporttemplates", "powerports", PowerPort),
|
||||
("poweroutlettemplates", "poweroutlets", PowerOutlet),
|
||||
("rearporttemplates", "rearports", RearPort),
|
||||
("frontporttemplates", "frontports", FrontPort)
|
||||
("frontporttemplates", "frontports", FrontPort),
|
||||
("modulebaytemplates", "modulebays", ModuleBay),
|
||||
]:
|
||||
create_instances = []
|
||||
update_instances = []
|
||||
|
Loading…
Reference in New Issue
Block a user