mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7082: Avoid exception when referencing invalid content type in table
This commit is contained in:
@@ -237,9 +237,13 @@ class ContentTypeColumn(tables.Column):
|
||||
Display a ContentType instance.
|
||||
"""
|
||||
def render(self, value):
|
||||
if value is None:
|
||||
return None
|
||||
return content_type_name(value)
|
||||
|
||||
def value(self, value):
|
||||
if value is None:
|
||||
return None
|
||||
return f"{value.app_label}.{value.model}"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user