If part has no category, page rendered an extra curly brace in JS that caused syntax error.

This commit is contained in:
James Newlands 2018-05-05 21:22:47 +10:00
parent 22e9290f54
commit 01da57f0cf

View File

@ -100,7 +100,7 @@
launchDeleteForm("#modal-delete", launchDeleteForm("#modal-delete",
"{% url 'part-delete' part.id %}", "{% url 'part-delete' part.id %}",
{ {
redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"}{% endif %} redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %}
}); });
}); });
{% endblock %} {% endblock %}