1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #8033: Fix display of zero values for custom integer fields in tables

This commit is contained in:
jeremystretch
2021-12-09 14:56:12 -05:00
parent e5524da40e
commit 1df05715c2
2 changed files with 4 additions and 1 deletions

View File

@@ -415,7 +415,9 @@ class CustomFieldColumn(tables.Column):
elif self.customfield.type == CustomFieldTypeChoices.TYPE_URL:
# Linkify custom URLs
return mark_safe(f'<a href="{value}">{value}</a>')
return value or self.default
if value is not None:
return value
return self.default
class MPTTColumn(tables.TemplateColumn):