mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 08:12:18 -06:00
RackType has no airflow attribute
This commit is contained in:
@@ -69,7 +69,6 @@ class RackTypePanel(panels.ObjectAttributesPanel):
|
|||||||
manufacturer = attrs.ObjectAttr('manufacturer', linkify=True)
|
manufacturer = attrs.ObjectAttr('manufacturer', linkify=True)
|
||||||
model = attrs.TextAttr('model')
|
model = attrs.TextAttr('model')
|
||||||
description = attrs.TextAttr('description')
|
description = attrs.TextAttr('description')
|
||||||
airflow = attrs.ChoiceAttr('airflow')
|
|
||||||
|
|
||||||
|
|
||||||
class DevicePanel(panels.ObjectAttributesPanel):
|
class DevicePanel(panels.ObjectAttributesPanel):
|
||||||
|
|||||||
@@ -232,5 +232,8 @@ def resolve_attr_path(obj, path):
|
|||||||
for part in path.split('.'):
|
for part in path.split('.'):
|
||||||
if cur is None:
|
if cur is None:
|
||||||
return None
|
return None
|
||||||
cur = getattr(cur, part) if hasattr(cur, part) else cur.get(part)
|
try:
|
||||||
|
cur = getattr(cur, part) if hasattr(cur, part) else cur.get(part)
|
||||||
|
except AttributeError:
|
||||||
|
cur = None
|
||||||
return cur
|
return cur
|
||||||
|
|||||||
Reference in New Issue
Block a user