diff --git a/templates/partials/tags.html b/templates/partials/tags.html index 38c4380..92f6cf8 100644 --- a/templates/partials/tags.html +++ b/templates/partials/tags.html @@ -53,7 +53,7 @@ confirmButtonText: 'Add', showLoaderOnConfirm: true, preConfirm: (tag) => { - return fetch(`{{ url_for('add_tag') }}?tag=${encodeURIComponent(tag)}&filter=${encodeURIComponent(window.location.search)}{{ '&person_id='+person_id if person_id else '' }}`) + return fetch(`{{ url_for('add_tag') }}?tag=${encodeURIComponent(tag)}&filter=${encodeURIComponent(window.location.search)}{% if person_id %} f'&person_id={person_id}' {% endif%}`) .then(response => { if (!response.ok) { throw new Error(response.statusText)