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

Draft: fail if the user exists when creating a new one #747

Closed

Conversation

tomwojcik
Copy link
Contributor

@tomwojcik tomwojcik commented Jul 2, 2023

Closes #716

todo:

  • think twice if it's really needed
  • add tests for username and email

@tomwojcik tomwojcik self-assigned this Jul 2, 2023
@insspb
Copy link

insspb commented Aug 9, 2023

This PR add exctra SQL query for rare case problem with duplicate fields. basically for very custom models.
So it is at least better to solve such cases in try except block. As try in python is cheap, in 3.11/3.12 is almost have no overhead (Check pycons 2022/2023). Exception for many cases will not even happen.
Implementation of .exist() query will affect everybody.

@tomwojcik
Copy link
Contributor Author

tomwojcik commented Nov 5, 2023

This PR add exctra SQL query for rare case problem with duplicate fields. basically for very custom models. So it is at least better to solve such cases in try except block. As try in python is cheap, in 3.11/3.12 is almost have no overhead (Check pycons 2022/2023). Exception for many cases will not even happen. Implementation of .exist() query will affect everybody.

I agree. Thanks for the feedback.

@tomwojcik tomwojcik closed this Nov 5, 2023
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.

Duplicated email address leads to 500 error
2 participants