mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-09 00:58:16 -06:00
Fix bug in _get_registered_content()
This commit is contained in:
parent
86cabd05fa
commit
4622d5c510
@ -23,7 +23,7 @@ def _get_registered_content(obj, method, template_context):
|
|||||||
}
|
}
|
||||||
|
|
||||||
template_extensions = list(registry['plugins']['template_extensions'].get(None, []))
|
template_extensions = list(registry['plugins']['template_extensions'].get(None, []))
|
||||||
if obj is not None:
|
if hasattr(obj, '_meta'):
|
||||||
model_name = obj._meta.label_lower
|
model_name = obj._meta.label_lower
|
||||||
template_extensions.extend(registry['plugins']['template_extensions'].get(model_name, []))
|
template_extensions.extend(registry['plugins']['template_extensions'].get(model_name, []))
|
||||||
for template_extension in template_extensions:
|
for template_extension in template_extensions:
|
||||||
|
Loading…
Reference in New Issue
Block a user