Prevent set(None) call
This commit is contained in:
parent
08fceeffc0
commit
57e07db972
@ -60,7 +60,7 @@ def badger():
|
||||
return 'User not found', 404
|
||||
|
||||
# Apply the action
|
||||
roles = set(db_user['roles'] or [])
|
||||
roles = set(db_user.get('roles', []) or [])
|
||||
if action == 'grant':
|
||||
roles.add(role)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user