Resolves sql warnings on 3.6 and fixes for scope expansion bug

This commit is contained in:
0mar
2021-06-17 12:45:54 +02:00
parent 0381b51648
commit 2f8f7ad0b0
5 changed files with 30 additions and 13 deletions

View File

@@ -717,7 +717,7 @@ class APIToken(Hashed, Base):
db.add(orm_token)
if not Role.find(db, 'token'):
raise AttributeError("Default token role has not been created")
raise RuntimeError("Default token role has not been created")
try:
if roles is not None:
update_roles(db, entity=orm_token, roles=roles)