Fix for put user
This commit is contained in:
parent
10479a625a
commit
b494650398
1 changed files with 3 additions and 2 deletions
|
@ -48,8 +48,9 @@ class UserService:
|
|||
KratosApi.put("/identities/{}".format(id), kratos_data)
|
||||
|
||||
app_role = AppRole.query.filter_by(user_id=id).first()
|
||||
app_role.role_id = data["role_id"] if "role_id" in data else None
|
||||
db.session.commit()
|
||||
if app_role:
|
||||
app_role.role_id = data["role_id"] if "role_id" in data else None
|
||||
db.session.commit()
|
||||
|
||||
return UserService.get_user(id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue