17186 change choice to default

This commit is contained in:
Arthur Hanson 2024-08-27 09:04:13 -07:00
parent 0f7b12f939
commit a98b6a6fdf

View File

@ -4,6 +4,7 @@ from django.utils.safestring import mark_safe
from core.models import ObjectType from core.models import ObjectType
from extras.models import CustomLink from extras.models import CustomLink
from netbox.choices import ButtonColorChoices
register = template.Library() register = template.Library()
@ -61,7 +62,7 @@ def custom_links(context, obj):
else: else:
try: try:
if rendered := cl.render(link_context): if rendered := cl.render(link_context):
if cl.button_class == "default": if cl.button_class == ButtonColorChoices.DEFAULT:
button_class = 'outline-secondary' button_class = 'outline-secondary'
else: else:
button_class = cl.button_class button_class = cl.button_class