mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
Misc cleanup
This commit is contained in:
parent
16ff3718bb
commit
33514d78b4
@ -1270,17 +1270,20 @@ class Module(PrimaryModel, ConfigContextModel):
|
||||
if not disable_replication:
|
||||
create_instances.append(template_instance)
|
||||
|
||||
# component_model.objects.bulk_create(create_instances)
|
||||
# # Emit the post_save signal for each newly created object
|
||||
# for component in create_instances:
|
||||
# post_save.send(
|
||||
# sender=component_model,
|
||||
# instance=component,
|
||||
# created=True,
|
||||
# raw=False,
|
||||
# using='default',
|
||||
# update_fields=None
|
||||
# )
|
||||
if component_model is not ModuleBay:
|
||||
component_model.objects.bulk_create(create_instances)
|
||||
# Emit the post_save signal for each newly created object
|
||||
for component in create_instances:
|
||||
post_save.send(
|
||||
sender=component_model,
|
||||
instance=component,
|
||||
created=True,
|
||||
raw=False,
|
||||
using='default',
|
||||
update_fields=None
|
||||
)
|
||||
else:
|
||||
# ModuleBays must be saved individually for MPTT
|
||||
for instance in create_instances:
|
||||
instance.save()
|
||||
|
||||
|
@ -313,10 +313,6 @@ class ModularDeviceComponentTable(DeviceComponentTable):
|
||||
verbose_name=_('Inventory Items'),
|
||||
)
|
||||
|
||||
class Meta(NetBoxTable.Meta):
|
||||
pass
|
||||
# order_by = ('device', 'module', 'name')
|
||||
|
||||
|
||||
class CableTerminationTable(NetBoxTable):
|
||||
cable = tables.Column(
|
||||
|
Loading…
Reference in New Issue
Block a user