From 76b666c2d2d369741488814d636165f3e765f2e9 Mon Sep 17 00:00:00 2001 From: Francesco Frassinelli Date: Sun, 24 Sep 2023 21:22:46 +0200 Subject: [PATCH] Handle empty multiple_checkbox --- .../templates/scheming/form_snippets/multiple_checkbox.html | 5 +++++ ckanext/scheming/validation.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ckanext/scheming/templates/scheming/form_snippets/multiple_checkbox.html b/ckanext/scheming/templates/scheming/form_snippets/multiple_checkbox.html index 0e4b8d13..57758858 100644 --- a/ckanext/scheming/templates/scheming/form_snippets/multiple_checkbox.html +++ b/ckanext/scheming/templates/scheming/form_snippets/multiple_checkbox.html @@ -27,6 +27,11 @@ {%- if field.get('sorted_choices') -%} {%- set choices = choices|sort(case_sensitive=false, attribute=1) -%} {%- endif -%} +
{%- for val, label in choices -%}