Commit d7082981 authored by Julien Phalip's avatar Julien Phalip
Browse files

Fixed #18420 -- Prevented the admin JS from crashing when the main form...

Fixed #18420 -- Prevented the admin JS from crashing when the main form contains no field. Thanks to maciej.maciaszek for the report and patch.
parent fadcc6dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@

{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}

{% if adminform and add %}
{% if adminform.first_field and add %}
   <script type="text/javascript">document.getElementById("{{ adminform.first_field.id_for_label }}").focus();</script>
{% endif %}