summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/editing_routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web/editing_routes.py')
-rw-r--r--python/fatcat_web/editing_routes.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/python/fatcat_web/editing_routes.py b/python/fatcat_web/editing_routes.py
index 44000b1a..e66f29c9 100644
--- a/python/fatcat_web/editing_routes.py
+++ b/python/fatcat_web/editing_routes.py
@@ -25,7 +25,7 @@ def form_editgroup_get_or_create(api, edit_form):
edit_form.editgroup_id.errors.append("Editgroup does not exist")
return None
app.log.warning(ae)
- abort(ae.status)
+ raise ae
if eg.changelog_index:
edit_form.editgroup_id.errors.append("Editgroup has already been accepted")
return None
@@ -36,7 +36,7 @@ def form_editgroup_get_or_create(api, edit_form):
Editgroup(description=edit_form.editgroup_description.data or None))
except ApiException as ae:
app.log.warning(ae)
- abort(ae.status)
+ raise ae
# set this session editgroup_id
flash('Started new editgroup <a href="/editgroup/{}">{}</a>'.format(
eg.editgroup_id,
@@ -123,7 +123,7 @@ def generic_entity_edit(editgroup_id, entity_type, existing_ident, edit_template
raise NotImplementedError
except ApiException as ae:
app.log.warning(ae)
- abort(ae.status)
+ raise ae
return redirect('/editgroup/{}/{}/{}'.format(editgroup.editgroup_id, entity_type, edit.ident))
else: # it's an update
# all the tricky logic is in the update method
@@ -151,7 +151,7 @@ def generic_entity_edit(editgroup_id, entity_type, existing_ident, edit_template
if ae.status == 404:
pass
else:
- abort(ae.status)
+ raise ae
try:
if entity_type == 'container':
edit = user_api.update_container(editgroup.editgroup_id, existing.ident, existing)
@@ -163,7 +163,7 @@ def generic_entity_edit(editgroup_id, entity_type, existing_ident, edit_template
raise NotImplementedError
except ApiException as ae:
app.log.warning(ae)
- abort(ae.status)
+ raise ae
return redirect('/editgroup/{}/{}/{}'.format(editgroup.editgroup_id, entity_type, edit.ident))
else:
status = 400
@@ -202,7 +202,7 @@ def generic_edit_delete(editgroup_id, entity_type, edit_id):
try:
editgroup = api.get_editgroup(editgroup_id)
except ApiException as ae:
- abort(ae.status)
+ raise ae
# check that editgroup is edit-able
if editgroup.changelog_index != None:
@@ -223,7 +223,7 @@ def generic_edit_delete(editgroup_id, entity_type, edit_id):
else:
raise NotImplementedError
except ApiException as ae:
- abort(ae.status)
+ raise ae
return redirect("/editgroup/{}".format(editgroup_id))