We have an API client that sends a ton of requests in parallel after getting a token from a different oauth service. As a result, we have a race condition for local account creation. This patch handles that by seeing if there was IntegrityError as an indication that another fork created the user already and then trying to find the created user to return instead of making it.
We have an API client that sends a ton of requests in parallel after getting a token from a different oauth service. As a result, we have a race condition for local account creation. This patch handles that by seeing if there was IntegrityError as an indication that another fork created the user already and then trying to find the created user to return instead of making it.