fix being able to add template without selecting a radio button

This commit is contained in:
Leo Hemsted
2018-12-07 16:38:48 +00:00
parent 180654046a
commit 6f8dc7e6d3
3 changed files with 13 additions and 6 deletions

View File

@@ -130,6 +130,9 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
except Exception as e:
flash(e.message)
if 'templates_and_folders' in templates_and_folders_form.errors:
flash('Select at least one template or folder')
return render_template(
'views/templates/choose.html',
current_template_folder_id=template_folder_id,