diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ad75a87..b88a1b51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Bug fixes - Fixes stats recording for Oracle hosts ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/397)) - Improve the use of the object oriented architecture ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/400)) +- Fix issue with API Server Instance is not serializable ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/401)) ### Tweaks None ### Lang diff --git a/app/classes/web/base_handler.py b/app/classes/web/base_handler.py index fd3ee638..b9a69c48 100644 --- a/app/classes/web/base_handler.py +++ b/app/classes/web/base_handler.py @@ -10,6 +10,7 @@ from app.classes.models.users import ApiKeys from app.classes.shared.helpers import Helpers from app.classes.shared.main_controller import Controller from app.classes.shared.translation import Translation +from app.classes.models.management import DatabaseShortcuts logger = logging.getLogger(__name__) @@ -204,6 +205,10 @@ class BaseHandler(tornado.web.RequestHandler): authorized_servers = self.controller.servers.get_authorized_servers( user["user_id"] # TODO: API key authorized servers? ) + authorized_servers = [ + DatabaseShortcuts.get_data_obj(x.server_object) + for x in authorized_servers + ] logger.debug("Checking results") if user: