Fixed config loading #1.1.0.rc1

This commit is contained in:
2023-08-16 08:30:12 +02:00
parent 1f47636e8d
commit 456d939b47
6 changed files with 26 additions and 10 deletions

View File

@@ -74,14 +74,14 @@ class ServerConfigRepositoryService(ServerConfigRepositoryABC):
)
def does_server_config_exists(self, server_id: int) -> bool:
self._logger.trace(__name__, f"Send SQL command: {ServerConfig.get_select_by_id_string(server_id)}")
result = self._context.select(ServerConfig.get_select_by_id_string(server_id))
self._logger.trace(__name__, f"Send SQL command: {ServerConfig.get_select_by_server_id_string(server_id)}")
result = self._context.select(ServerConfig.get_select_by_server_id_string(server_id))
return len(result) > 0
def get_server_config_by_server(self, server_id: int) -> ServerConfig:
self._logger.trace(__name__, f"Send SQL command: {ServerConfig.get_select_by_id_string(server_id)}")
result = self._context.select(ServerConfig.get_select_by_id_string(server_id))[0]
self._logger.trace(__name__, f"Send SQL command: {ServerConfig.get_select_by_server_id_string(server_id)}")
result = self._context.select(ServerConfig.get_select_by_server_id_string(server_id))[0]
return self._from_result(result)