Fix bugs in User.auth()
This commit is contained in:
parent
a2acd9c108
commit
3e7fea6c11
1 changed files with 7 additions and 2 deletions
|
@ -41,9 +41,14 @@ class User(DatabaseTable):
|
||||||
and user_perm.user_id = ?
|
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]]
|
perms |= UserPermission[row[0]]
|
||||||
|
|
||||||
return perms
|
return perms
|
||||||
|
|
Loading…
Add table
Reference in a new issue