From c46b6e5e470433b728242bd174f125acfbfae83c Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 4 Nov 2025 02:20:27 +0700 Subject: [PATCH] refactor: remove usage of length_is filter (https://github.com/adams-okode/django-volt-admin/issues/1) Closes https://github.com/adams-okode/django-volt-admin/issues/1 --- volt/templates/admin/includes/fieldset.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/volt/templates/admin/includes/fieldset.html b/volt/templates/admin/includes/fieldset.html index 218fd5a..19d2971 100644 --- a/volt/templates/admin/includes/fieldset.html +++ b/volt/templates/admin/includes/fieldset.html @@ -4,11 +4,11 @@
{{ fieldset.description|safe }}
{% endif %} {% for line in fieldset %} -
- {% if line.fields|length_is:'1' %}{{ line.errors }}{% endif %} +
+ {% if line.fields|length == 1 %}{{ line.errors }}{% endif %} {% for field in line %} - - {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} + + {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %} {% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %}