Fix bugs in User.auth()

This commit is contained in:
XANTRONIX Development 2024-11-29 23:45:34 -05:00
parent a2acd9c108
commit 3e7fea6c11

View file

@ -41,9 +41,14 @@ class User(DatabaseTable):
and user_perm.user_id = ?
"""
cr = db.execute(sql, self.id)
cr = db.execute(sql, (self.id,))
while True:
row = cr.fetchone()
if row is None:
break
for row in cr.each():
perms |= UserPermission[row[0]]
return perms