1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Enable bulk creation tests for device components

This commit is contained in:
Jeremy Stretch
2020-02-05 15:22:57 -05:00
parent 75906f7591
commit 0ad613e6b4
5 changed files with 194 additions and 8 deletions

View File

@@ -812,7 +812,7 @@ class InterfaceCreateForm(ComponentForm):
(group.name, [(vlan.pk, vlan) for vlan in global_group_vlans])
)
parent = VirtualMachine.objects.get(pk=self.initial['virtual_machine'])
parent = VirtualMachine.objects.get(pk=self.initial.get('virtual_machine'))
site = getattr(parent.cluster, 'site', None)
if site is not None: