mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
Fix display of custom object fields within tables
This commit is contained in:
parent
c8713d94d8
commit
b07a7ba9bc
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user