diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 82064248..6d3c3d4e 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -43,6 +43,8 @@ SUBPAGE_PERMS = { SCHEDULE_AUTH_ERROR_URL = "/panel/error?error=Unauthorized access To Schedules" +HUMANIZED_INDEX_FILE = "humanized_index.json" + class PanelHandler(BaseHandler): def get_user_roles(self) -> t.Dict[str, list]: @@ -880,7 +882,7 @@ class PanelHandler(BaseHandler): os.path.join(self.helper.root_dir, "app", "translations") ) ): - if file == "humanized_index.json": + if file == HUMANIZED_INDEX_FILE: continue if file.endswith(".json"): if file.split(".")[0] not in self.helper.get_setting( @@ -978,7 +980,7 @@ class PanelHandler(BaseHandler): for file in sorted( os.listdir(os.path.join(self.helper.root_dir, "app", "translations")) ): - if file == "humanized_index.json": + if file == HUMANIZED_INDEX_FILE: continue if file.endswith(".json"): if file.split(".")[0] not in self.helper.get_setting( @@ -1437,7 +1439,7 @@ class PanelHandler(BaseHandler): for file in sorted( os.listdir(os.path.join(self.helper.root_dir, "app", "translations")) ): - if file == "humanized_index.json": + if file == HUMANIZED_INDEX_FILE: continue if file.endswith(".json"): if file.split(".")[0] not in self.helper.get_setting(