Closed toconnell closed 7 months ago
Fixed the response:
diff --git a/app/assets/__init__.py b/app/assets/__init__.py
index d4f18ec..8f51de7 100644
--- a/app/assets/__init__.py
+++ b/app/assets/__init__.py
@@ -36,13 +36,16 @@ from app.models import settlements, survivors, users
@utils.metered
def get_game_asset(collection_name, return_type=flask.Response):
""" Formerly a part of the (deprecated) request_broker.py module, this
- method imports an asset type, alls its Assets() method and then returns
+ method imports an asset type, calls its Assets() method and then returns
its request_response() method.
This could honestly go back into routes.py at this point.
"""
- game_asset = getattr(KingdomDeath, collection_name)
+ game_asset = getattr(KingdomDeath, collection_name, None)
+ if game_asset is None:
+ return utils.HTTP_404
+
This seems like it might be significant less in terms of the response (which should probably be a 404, so we'll fix that here), but more in terms of ...which application or view or whatever is trying to pull expansion assets this way?