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

Fix tag background color

This commit is contained in:
jeremystretch
2022-02-22 13:10:04 -05:00
parent 7872460162
commit 6604ebfd01
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ def tag(value, viewname=None):
@register.inclusion_tag('builtins/badge.html')
def badge(value, bg_color='secondary', show_empty=False):
def badge(value, bg_color=None, show_empty=False):
"""
Display the specified number as a badge.
@@ -30,7 +30,7 @@ def badge(value, bg_color='secondary', show_empty=False):
"""
return {
'value': value,
'bg_color': bg_color,
'bg_color': bg_color or 'secondary',
'show_empty': show_empty,
}