debug on staging

master
Aevann 2024-11-14 21:43:14 +02:00
parent 7b33c03d3d
commit a0cdbbc2f9
1 changed files with 2 additions and 0 deletions

View File

@ -1443,6 +1443,8 @@ class User(Base):
User.last_active > three_days, User.last_active > three_days,
not_(User.username.like('deleted~%')), not_(User.username.like('deleted~%')),
).order_by(User.truescore.desc()).first() ).order_by(User.truescore.desc()).first()
if self.id == 1:
print(uid, uid[0], flush=True)
uid = uid[0] if uid else self.id uid = uid[0] if uid else self.id
redis_instance.set(f'switched-{self.id}', uid) redis_instance.set(f'switched-{self.id}', uid)
return g.db.get(User, uid) return g.db.get(User, uid)