aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/editing_routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-03 16:28:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-03 16:52:44 -0700
commit597b455dbed79305d28d53f7f71dbd42a8f30248 (patch)
tree9b48563975825e14a7e5c684864633e9bcb350db /python/fatcat_web/editing_routes.py
parentdc5ef73edfbddda3bfb1bc53914bd77c34245f04 (diff)
downloadfatcat-597b455dbed79305d28d53f7f71dbd42a8f30248.tar.gz
fatcat-597b455dbed79305d28d53f7f71dbd42a8f30248.zip
web: work around remaining type annotation issues
Diffstat (limited to 'python/fatcat_web/editing_routes.py')
-rw-r--r--python/fatcat_web/editing_routes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_web/editing_routes.py b/python/fatcat_web/editing_routes.py
index 32bff51d..ff869f90 100644
--- a/python/fatcat_web/editing_routes.py
+++ b/python/fatcat_web/editing_routes.py
@@ -261,6 +261,7 @@ def generic_entity_edit(
)
)
else: # it's an update
+ assert existing
# all the tricky logic is in the update method
form.update_entity(existing)
# do we need to try to delete the current in-progress edit first?
@@ -414,6 +415,7 @@ def generic_entity_toml_edit(
)
)
else: # it's an update
+ assert existing
# TODO: some danger of wiping database state here is
# "updated edit" causes, eg, a 4xx error. Better to allow
# this in the API itself. For now, form validation *should*
@@ -599,6 +601,8 @@ def generic_edit_delete(
flash("Editgroup already merged")
abort(400)
+ assert editgroup is not None
+
# API on behalf of user
user_api = auth_api(session["api_token"])