only catch HTTPError

also add tests
This commit is contained in:
Leo Hemsted
2018-12-17 15:24:24 +00:00
parent 5c3c4ec78c
commit 94da05ebc4
2 changed files with 47 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
abort(403)
try:
return process_folder_management_form(templates_and_folders_form, template_folder_id)
except Exception as e:
except HTTPError as e:
flash(e.message)
if 'templates_and_folders' in templates_and_folders_form.errors: