mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
adjust oob_ip_id check to use hasattr
This commit is contained in:
parent
0f1247c6ef
commit
bb8348d639
@ -892,7 +892,7 @@ class IPAddress(PrimaryModel):
|
|||||||
def is_oob_ip(self):
|
def is_oob_ip(self):
|
||||||
if self.assigned_object:
|
if self.assigned_object:
|
||||||
parent = getattr(self.assigned_object, 'parent_object', None)
|
parent = getattr(self.assigned_object, 'parent_object', None)
|
||||||
if parent.__class__.__name__ == "Device" and parent.oob_ip_id == self.pk:
|
if hasattr(parent, "oob_ip_id") and parent.oob_ip_id == self.pk:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user