#393 #399

Merged
edraft merged 5 commits from #393 into dev 2023-10-03 10:53:36 +02:00
4 changed files with 1 additions and 13 deletions
Showing only changes of commit 9e12d84ba0 - Show all commits

View File

@ -8,7 +8,6 @@ from bot_data.model.server import Server
from bot_data.model.technician_config import TechnicianConfig
from bot_data.service.server_config_seeder import ServerConfigSeeder
from bot_data.service.technician_config_seeder import TechnicianConfigSeeder
from modules.permission.abc.permission_service_abc import PermissionServiceABC
class ConfigService:
@ -45,6 +44,3 @@ class ConfigService:
self._config.add_configuration(
f"{type(server_config).__name__}_{server_config.server.discord_id}", server_config
)
permissions: PermissionServiceABC = self._services.get_service(PermissionServiceABC)
permissions.on_ready()

View File

@ -13,7 +13,6 @@ from bot_data.model.server_team_role_ids_config import ServerTeamRoleIdsConfig
from bot_data.model.team_member_type_enum import TeamMemberTypeEnum
from bot_data.model.user_role_enum import UserRoleEnum
from bot_graphql.abc.query_abc import QueryABC
from modules.permission.abc.permission_service_abc import PermissionServiceABC
class ServerConfigMutation(QueryABC):
@ -25,7 +24,6 @@ class ServerConfigMutation(QueryABC):
server_configs: ServerConfigRepositoryABC,
db: DatabaseContextABC,
config_service: ConfigService,
permissions: PermissionServiceABC,
):
QueryABC.__init__(self, "ServerConfigMutation")
@ -35,7 +33,6 @@ class ServerConfigMutation(QueryABC):
self._server_configs = server_configs
self._db = db
self._config_service = config_service
self._permissions = permissions
self.set_field("updateServerConfig", self.resolve_update_server_config)
@ -183,4 +180,3 @@ class ServerConfigMutation(QueryABC):
self._server_configs.add_server_team_role_id_config(role_id)
self._bot.loop.create_task(self._config_service.reload_server_config(new_config.server))
self._permissions.on_ready()

View File

@ -12,7 +12,6 @@ from bot_data.model.technician_id_config import TechnicianIdConfig
from bot_data.model.technician_ping_url_config import TechnicianPingUrlConfig
from bot_data.model.user_role_enum import UserRoleEnum
from bot_graphql.abc.query_abc import QueryABC
from modules.permission.abc.permission_service_abc import PermissionServiceABC
class TechnicianConfigMutation(QueryABC):
@ -23,7 +22,6 @@ class TechnicianConfigMutation(QueryABC):
servers: ServerRepositoryABC,
technician_configs: TechnicianConfigRepositoryABC,
db: DatabaseContextABC,
permissions: PermissionServiceABC,
config_service: ConfigService,
):
QueryABC.__init__(self, "TechnicianConfigMutation")
@ -33,7 +31,6 @@ class TechnicianConfigMutation(QueryABC):
self._servers = servers
self._technician_configs = technician_configs
self._db = db
self._permissions = permissions
self._config_service = config_service
self.set_field("updateTechnicianConfig", self.resolve_update_technician_config)
@ -114,4 +111,3 @@ class TechnicianConfigMutation(QueryABC):
self._technician_configs.add_technician_id_config(TechnicianIdConfig(technician_id))
self._bot.loop.create_task(self._config_service.reload_technician_config())
self._permissions.on_ready()

View File

@ -67,7 +67,7 @@ class BootLogOnReadyEvent(OnReadyABC):
server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{g.id}")
if server_config is None:
self._logger.error(__name__, f"Config {type(self).__name__}_{g.id} not found!")
self._logger.error(__name__, f"Config ServerConfig_{g.id} not found!")
return
if not FeatureFlagsSettings.get_flag_from_dict(