Merge branch 'bug/fix-issue-#106' into 'dev'

Fix for issue #106

See merge request crafty-controller/crafty-4!401
This commit is contained in:
Iain Powrie 2022-07-18 20:22:28 +00:00
commit 924d39040d
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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: