theLaborInVain / kdm-manager-api

The API used by https://kdm-manager.com and related Kingdom Death: Monster utilities.
Other
3 stars 0 forks source link

Game Assets: King Spear lookup failure #40

Closed toconnell closed 3 years ago

toconnell commented 3 years ago

User OID: 666 Method: POST URL: http://api.kdm-manager.com/game_assets/gear?name=king%20spear JSON: None

Traceback (most recent call last):
File "/home/toconnell/kdm-manager-api/venv/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
 rv = self.dispatch_request()
File "/home/toconnell/kdm-manager-api/venv/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
 return self.view_functions[rule.endpoint](**req.view_args)
File "/home/toconnell/kdm-manager-api/app/utils/crossdomain.py", line 56, in wrapped_function
 resp = flask.make_response(func(*args, **kwargs))
File "/home/toconnell/kdm-manager-api/app/routes.py", line 242, in lookup_asset
 return assets.get_game_asset(asset_type)
File "/home/toconnell/kdm-manager-api/app/assets/__init__.py", line 114, in get_game_asset
 return A.request_response()
File "/home/toconnell/kdm-manager-api/app/models/__init__.py", line 682, in request_response
 a_name = flask.request.json.get("name", None)
AttributeError: 'NoneType' object has no attribute 'get'
toconnell commented 3 years ago

This returns gear JSON (as expected) now.