From e768de48bef8ea3fec5ac6ee5ff75dfe5c669ee5 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 19 Aug 2025 10:44:17 +0200 Subject: [PATCH] fix: changeform messages spacing --- src/unfold/templates/admin/change_form.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/unfold/templates/admin/change_form.html b/src/unfold/templates/admin/change_form.html index 88b7a6383..6b2cd1815 100644 --- a/src/unfold/templates/admin/change_form.html +++ b/src/unfold/templates/admin/change_form.html @@ -52,8 +52,12 @@ {% endif %} - {% include "unfold/helpers/messages/errornote.html" with errors=errors %} - {% include "unfold/helpers/messages/error.html" with errors=adminform.form.non_field_errors %} + {% if errors or adminform.form.non_field_errors %} +
+ {% include "unfold/helpers/messages/errornote.html" with errors=errors %} + {% include "unfold/helpers/messages/error.html" with errors=adminform.form.non_field_errors %} +
+ {% endif %} {% block field_sets %} {% with has_conditional_display=adminform.model_admin.conditional_fields %}