Merge branch 'bug/api-stdin' into 'dev'

Fix bug with API stdin

See merge request crafty-controller/crafty-4!470
This commit is contained in:
Iain Powrie 2022-10-02 18:48:16 +00:00
commit 7cd237d65b
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@
TBD
### Bug fixes
- Fix traceback on basic schedule with "days" interval ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/469))
- Fix bad method call with API stdin ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/470))<br>
*(Thank you ['IWant2Tryhard'](https://github.com/MyNameTsThad) for catching that 🐛)*
### Tweaks
TBD
### Lang

View File

@ -26,7 +26,7 @@ class ApiServersServerStdinHandler(BaseApiHandler):
# if the user doesn't have Commands permission, return an error
return self.finish_json(400, {"status": "error", "error": "NOT_AUTHORIZED"})
svr = self.controller.get_server_obj_optional(server_id)
svr = self.controller.servers.get_server_obj_optional(server_id)
if svr is None:
# It's in auth_data[0] but not as a Server object
logger.critical(