Skip to content

Commit

Permalink
jsonschema_validation: Quotes around string values
Browse files Browse the repository at this point in the history
  • Loading branch information
jarofgreen committed Nov 17, 2022
1 parent ec03506 commit f67c3c5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load i18n %}
{% load cove_tags %}
{% load ofds_cove_tags %}

<table class="table table-condensed">
<thead>
Expand Down Expand Up @@ -37,7 +38,7 @@
</td>
{% if col_instance %}
<td>
{{ error.instance }}
{{ error.instance|error_instance_display }}
</td>
{% endif %}
{% if col_validator_value %}
Expand Down
Empty file.
11 changes: 11 additions & 0 deletions cove_ofds/templatetags/ofds_cove_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django import template

register = template.Library()


@register.filter(name="error_instance_display")
def error_instance_display(input):
if isinstance(input, str):
return '"' + input + '"'
else:
return str(input)

0 comments on commit f67c3c5

Please sign in to comment.