From 597b455dbed79305d28d53f7f71dbd42a8f30248 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Nov 2021 16:28:29 -0700 Subject: web: work around remaining type annotation issues --- python/fatcat_web/editing_routes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/fatcat_web/editing_routes.py') 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"]) -- cgit v1.2.3