From d708298184f8e19f250d2cee5bb900e496ed1175 Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Sat, 16 Jun 2012 17:18:23 -0700 Subject: [PATCH] Fixed #18420 -- Prevented the admin JS from crashing when the main form contains no field. Thanks to maciej.maciaszek for the report and patch. --- django/contrib/admin/templates/admin/change_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index ead37b187fd..e455793f682 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -65,7 +65,7 @@ {% block submit_buttons_bottom %}{% submit_row %}{% endblock %} -{% if adminform and add %} +{% if adminform.first_field and add %} {% endif %}