fix(user_console): ensure uid returns a valid value by defaulting to 1

This commit is contained in:
HibiKier
2025-12-23 16:38:08 +08:00
parent 36667f9e19
commit 142afde336
2 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ class UserConsole(Model):
uid = data[0] if data else 0
uid = uid + 1
await CacheRoot.set(CacheType.TEMP, "USER_CONSOLE_UID", uid)
return uid
return uid or 1
@classmethod
async def add_gold(