Add test for textarea

Also remove redundant error handling - if unexpected error happens,
it will be handled at the app level.
This commit is contained in:
Pea Tyczynska
2021-01-19 18:13:03 +00:00
parent 5ec49fc976
commit 5eb6ac2311
2 changed files with 5 additions and 8 deletions

View File

@@ -1199,14 +1199,10 @@ def edit_service_notes(service_id):
if form.notes.data == current_service.notes:
return redirect(url_for('.service_settings', service_id=service_id))
try:
current_service.update(
notes=form.notes.data
)
except HTTPError as e:
raise e
else:
return redirect(url_for('.service_settings', service_id=service_id))
current_service.update(
notes=form.notes.data
)
return redirect(url_for('.service_settings', service_id=service_id))
return render_template(
'views/service-settings/edit-service-notes.html',