From dd137f34d5b7df46de06825dd8c29646609ba40a Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Mon, 9 Dec 2024 22:47:26 +0000 Subject: [PATCH] fix(templates): selected value; - Selected value for data dictionary field. --- .../xloader/templates/datastore/snippets/dictionary_form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/xloader/templates/datastore/snippets/dictionary_form.html b/ckanext/xloader/templates/datastore/snippets/dictionary_form.html index 808aa764..6c2f576c 100644 --- a/ckanext/xloader/templates/datastore/snippets/dictionary_form.html +++ b/ckanext/xloader/templates/datastore/snippets/dictionary_form.html @@ -8,10 +8,10 @@ {% else %} {% set field_prefix = 'info__' %} {% endif %} - {% set is_selected = field.get('info', {}).get('strip_extra_white', field.get('strip_extra_white')) != 'False' %} + {% set selected_value = field.get('info', {}).get('strip_extra_white', field.get('strip_extra_white', true)) %} {{ form.select(field_prefix ~ position ~ '__strip_extra_white', label=_('Strip Extra Leading and Trailing White Space'), options=[ {'text': _('Yes'), 'value': true}, {'text': _('No'), 'value': false}, - ], selected=is_selected) }} + ], selected=selected_value) }} {% endblock %}