Fix template delete links.

Fix bug with 'current_service' not available for non service urls.

Code review adjustment.

Static code check.
This commit is contained in:
Nicholas Staples
2016-04-13 16:19:34 +01:00
parent f76375875a
commit 33cc90488c
4 changed files with 11 additions and 11 deletions

View File

@@ -21,7 +21,7 @@
{{ textbox(form.template_content, highlight_tags=True, width='1-1') }}
{{ page_footer(
'Save',
delete_link=url_for('.delete_service_template', service_id=service_id, template_id=template_id) if template_id or None,
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
delete_link_text='Delete this template'
) }}
</div>