Skip to content
Snippets Groups Projects
Commit b4946503 authored by Luka's avatar Luka
Browse files

Fix for put user

parent 10479a62
No related branches found
No related tags found
1 merge request!55Resolve "Merge dashboard and dashboard-backend repos"
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment