diff options
| -rw-r--r-- | django/contrib/admin/templates/admin/change_form.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index 2fb17bb943..f645d65a0f 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -54,7 +54,7 @@ {% submit_row %} -{% if add %} +{% if adminform and add %} <script type="text/javascript">document.getElementById("{{ adminform.first_field.auto_id }}").focus();</script> {% endif %} |
