You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug appears on the initial load of a user (i.e. when the models.KeyCloak is not yet persisted to db) . When firing two simulatious request on function backend.get_user_by_id can raise an IntegrityError exception (duplicate key in models.KeyCloak) on line 157 of bossoidc.backend
This bug appears on the initial load of a user (i.e. when the models.KeyCloak is not yet persisted to db) . When firing two simulatious request on function backend.get_user_by_id can raise an IntegrityError exception (duplicate key in models.KeyCloak) on line 157 of bossoidc.backend
suggested fix:
change
kc_user = KeycloakModel.objects.create(user = user, UID = uid)
to:
kc_user, created = KeycloakModel.objects.get_or_create(user = user, UID = uid)
The text was updated successfully, but these errors were encountered: