Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exception handling for user creation race condition in Django #975

Merged
merged 1 commit into from
Aug 6, 2016

Conversation

carsongee
Copy link
Contributor

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.

@omab omab merged commit 11c152b into omab:master Aug 6, 2016
@omab
Copy link
Owner

omab commented Aug 6, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants