Fix for put user

This commit is contained in:
Luka Radenovic 2022-04-15 10:53:20 +02:00
parent 10479a625a
commit b494650398

View file

@ -48,8 +48,9 @@ class UserService:
KratosApi.put("/identities/{}".format(id), kratos_data) KratosApi.put("/identities/{}".format(id), kratos_data)
app_role = AppRole.query.filter_by(user_id=id).first() app_role = AppRole.query.filter_by(user_id=id).first()
app_role.role_id = data["role_id"] if "role_id" in data else None if app_role:
db.session.commit() app_role.role_id = data["role_id"] if "role_id" in data else None
db.session.commit()
return UserService.get_user(id) return UserService.get_user(id)