Skip to content

Commit 46f734e

Browse files
authored
fix error for is_oob_ip for non-device parents (#13621)
* fix error for is_oob_ip for non-device parents * adjust oob_ip_id check to use hasattr
1 parent 671a561 commit 46f734e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/ipam/models/ip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ def family(self):
892892
def is_oob_ip(self):
893893
if self.assigned_object:
894894
parent = getattr(self.assigned_object, 'parent_object', None)
895-
if parent.oob_ip_id == self.pk:
895+
if hasattr(parent, "oob_ip_id") and parent.oob_ip_id == self.pk:
896896
return True
897897
return False
898898

0 commit comments

Comments
 (0)