diff --git a/netbox/netbox/ui/attrs.py b/netbox/netbox/ui/attrs.py index e4bd93c4e..ac798ba5c 100644 --- a/netbox/netbox/ui/attrs.py +++ b/netbox/netbox/ui/attrs.py @@ -506,6 +506,7 @@ class TemplatedAttr(ObjectAttribute): def get_context(self, obj, context): return { + **context, **self.context, 'object': obj, } diff --git a/netbox/netbox/ui/panels.py b/netbox/netbox/ui/panels.py index 295428aff..222addd80 100644 --- a/netbox/netbox/ui/panels.py +++ b/netbox/netbox/ui/panels.py @@ -187,7 +187,7 @@ class ObjectAttributesPanel(ObjectPanel, metaclass=ObjectAttributesPanelMeta): 'attrs': [ { 'label': attr.label or self._name_to_label(name), - 'value': attr.render(ctx['object'], {'name': name}), + 'value': attr.render(ctx['object'], {'name': name, 'perms': ctx['perms']}), } for name, attr in self._attrs.items() if name in attr_names ], }