mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix display of custom object fields within tables
This commit is contained in:
@ -324,7 +324,10 @@ class CustomFieldColumn(tables.Column):
|
||||
# Linkify custom URLs
|
||||
return mark_safe(f'<a href="{value}">{value}</a>')
|
||||
if value is not None:
|
||||
return value
|
||||
obj = self.customfield.deserialize(value)
|
||||
if hasattr(obj, 'get_absolute_url'):
|
||||
return mark_safe(f'<a href="{obj.get_absolute_url}">{obj}</a>')
|
||||
return obj
|
||||
return self.default
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user