fix: bug
This commit is contained in:
@@ -709,10 +709,10 @@ class UserStore:
|
||||
cycle_started_at = int(row["cycle_started_at"] or 0) if row else 0
|
||||
cycle_expires_at = int(row["cycle_expires_at"] or 0) if row else 0
|
||||
now = int(time.time())
|
||||
cycle_active = cycle_expires_at > now if cycle_expires_at > 0 else True
|
||||
# 仅当已开启有效计费周期时,席位额度才可用;新用户未购买时不应显示席位 1500
|
||||
cycle_active = cycle_started_at > 0 and cycle_expires_at > now
|
||||
if not cycle_active:
|
||||
seat_remaining = 0
|
||||
shared_credits = 0
|
||||
return {
|
||||
"vip_enabled": bool(int(row["vip_enabled"] or 0)) if row else False,
|
||||
"token_balance": shared_credits,
|
||||
|
||||
Reference in New Issue
Block a user