mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Handle editing IPAddresses on VMInterfaces without parent.oob_ip
This commit is contained in:
parent
74a65fd359
commit
d0bad3f843
@ -361,7 +361,7 @@ class IPAddressForm(TenancyForm, NetBoxModelForm):
|
|||||||
):
|
):
|
||||||
self.initial['primary_for_parent'] = True
|
self.initial['primary_for_parent'] = True
|
||||||
|
|
||||||
if parent and (parent.oob_ip_id == self.instance.pk):
|
if parent and getattr(parent, 'oob_ip_id', None) == self.instance.pk:
|
||||||
self.initial['oob_for_parent'] = True
|
self.initial['oob_for_parent'] = True
|
||||||
|
|
||||||
if type(instance.assigned_object) is Interface:
|
if type(instance.assigned_object) is Interface:
|
||||||
|
Loading…
Reference in New Issue
Block a user