Skip to content

Commit c0fec28

Browse files
bctiemannjeremystretch
authored andcommitted
Handle editing IPAddresses on VMInterfaces without parent.oob_ip
1 parent 382e246 commit c0fec28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/ipam/forms/model_forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def __init__(self, *args, **kwargs):
361361
):
362362
self.initial['primary_for_parent'] = True
363363

364-
if parent and (parent.oob_ip_id == self.instance.pk):
364+
if parent and getattr(parent, 'oob_ip_id', None) == self.instance.pk:
365365
self.initial['oob_for_parent'] = True
366366

367367
if type(instance.assigned_object) is Interface:

0 commit comments

Comments
 (0)