fix(ui): Display nested group and platform hierarchies

Replace RelatedObjectAttr with NestedObjectAttr for Tenant Groups,
Wireless LAN Groups, and Device Type default platforms. Limit Platform
hierarchies to three levels for consistency with existing Platform
fields.

Fixes #22954
This commit is contained in:
Martin Hauser 2026-08-18 17:51:20 +02:00 committed by Jeremy Stretch
parent 604653935c
commit 3f662dd222
4 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ class DeviceTypePanel(panels.ObjectAttributesPanel):
manufacturer = attrs.RelatedObjectAttr('manufacturer', linkify=True)
model = attrs.TextAttr('model')
part_number = attrs.TextAttr('part_number')
default_platform = attrs.RelatedObjectAttr('default_platform', linkify=True)
default_platform = attrs.NestedObjectAttr('default_platform', linkify=True, max_depth=3)
description = attrs.TextAttr('description')
height = attrs.TemplatedAttr('u_height', template_name='dcim/devicetype/attrs/height.html')
exclude_from_utilization = attrs.BooleanAttr('exclude_from_utilization')

View File

@ -4,7 +4,7 @@ from netbox.ui import attrs, panels
class TenantPanel(panels.ObjectAttributesPanel):
group = attrs.RelatedObjectAttr('group', linkify=True)
group = attrs.NestedObjectAttr('group', linkify=True)
description = attrs.TextAttr('description')

View File

@ -24,7 +24,7 @@ class ClusterPanel(panels.ObjectAttributesPanel):
class VirtualMachineTypePanel(panels.ObjectAttributesPanel):
name = attrs.TextAttr('name')
default_platform = attrs.RelatedObjectAttr('default_platform', linkify=True)
default_platform = attrs.NestedObjectAttr('default_platform', linkify=True, max_depth=3)
default_vcpus = attrs.TextAttr('default_vcpus', label=_('Default vCPUs'))
default_memory = attrs.TemplatedAttr(
'default_memory',

View File

@ -9,7 +9,7 @@ class WirelessLANGroupPanel(panels.NestedGroupObjectPanel):
class WirelessLANPanel(panels.ObjectAttributesPanel):
ssid = attrs.TextAttr('ssid', label=_('SSID'))
group = attrs.RelatedObjectAttr('group', linkify=True)
group = attrs.NestedObjectAttr('group', linkify=True)
status = attrs.ChoiceAttr('status')
scope = attrs.GenericForeignKeyAttr('scope', linkify=True, nested=True, max_depth=3)
description = attrs.TextAttr('description')