removed empty script tag when no default is given

This commit is contained in:
vabene1111 2020-02-18 22:17:27 +01:00
parent 8fd6dcc81c
commit 04cbe6cb2c

View File

@ -23,14 +23,15 @@
<button class="btn btn-success" type="submit"><i class="fas fa-save"></i> {% trans 'Save' %}</button>
</form>
{% if default_recipe %}
<script type="text/javascript">
<script type="text/javascript">
{% if default_recipe %}
$(document).ready(function () {
$('#id_recipe').val({{ default_recipe.pk }}).trigger('change');
});
{% endif %}
</script>
</script>
{% endif %}
{% endblock %}