diff --git a/netbox/templates/inc/custom_fields_panel.html b/netbox/templates/inc/custom_fields_panel.html index d938244ac..bd80974eb 100644 --- a/netbox/templates/inc/custom_fields_panel.html +++ b/netbox/templates/inc/custom_fields_panel.html @@ -1,4 +1,3 @@ -{% load helpers %} {% with custom_fields=object.get_custom_fields %} {% if custom_fields %}
@@ -18,8 +17,6 @@ {{ value|truncatechars:70 }} {% elif field.type == 'multiselect' and value %} {{ value|join:", " }} - {% elif field.type == 'date' and value %} - {{ value|annotated_date }} {% elif value is not None %} {{ value }} {% elif field.required %} diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 54725502a..afa45537a 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -162,10 +162,6 @@ def annotated_date(date_value): if not date_value: return '' - # ../../templates/inc/custom_fields_panel.html passes a string. - if type(date_value) == str: - date_value = datetime.datetime.strptime(date_value, "%Y-%m-%d").date() - if type(date_value) == datetime.date: long_ts = date(date_value, 'DATE_FORMAT') short_ts = date(date_value, 'SHORT_DATE_FORMAT')