Set constant variable for humaized index file

This commit is contained in:
= 2025-01-19 13:19:15 -05:00
parent 23e2e73ab7
commit e1f8f023de

View File

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