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

Campaign Summary: Departing survivors cannot be returned #64

Closed toconnell closed 2 years ago

toconnell commented 2 years ago

User OID: 61ed4104f9eb7429e9137f71 Method: POST URL: http://api.kdm-manager.com/settlement/return_survivors/61f3a9384378798ebdb14e09 JSON: {'aftermath': 'victory', 'increment_ly': True, 'serialize_on_response': True}

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 57, in wrapped_function
 resp = flask.make_response(func(*args, **kwargs))
File "/home/toconnell/kdm-manager-api/app/routes.py", line 485, in collection_action
 return asset_object.request_response(action)
File "/home/toconnell/kdm-manager-api/app/models/settlements.py", line 4988, in request_response
 return super().request_response(action)
File "/home/toconnell/kdm-manager-api/app/models/__init__.py", line 1728, in request_response
 method_response = method()
File "/home/toconnell/kdm-manager-api/app/models/settlements.py", line 1833, in return_survivors
 self.add_defeated_monster(self.settlement['current_quarry'])
File "/home/toconnell/kdm-manager-api/app/models/settlements.py", line 789, in add_defeated_monster
 killboard_dict[a] = M.get(a)
AttributeError: 'Monster' object has no attribute 'get'
toconnell commented 2 years ago

This is because .get() is no longer a thing for these assets.

toconnell commented 2 years ago

Hotfixed.