refactor(app): update database code

This commit is contained in:
MingxuanGame
2025-08-18 16:37:30 +00:00
parent 6bae937e01
commit 1c65b21bb9
34 changed files with 167 additions and 188 deletions

View File

@@ -92,7 +92,7 @@ class GameMode(str, Enum):
def parse(cls, v: str | int) -> "GameMode | None":
if isinstance(v, int) or v.isdigit():
return cls.from_int_extra(int(v))
v = v.lower()
v = v.upper()
try:
return cls[v]
except ValueError: