python
data_error
ai_generated
true
django.db.utils.IntegrityError: UNIQUE constraint failed: auth_user.email
ID: python/django-auth-user-email-unique
80%Fix Rate
84%Confidence
0Evidence
2024-09-03First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
Attempting to create a user with an email that already exists.
generic中文
尝试创建具有已存在电子邮件的用户。
Workarounds
-
90% success
Check email existence before creation: if User.objects.filter(email=email).exists(): return error
Dead Ends
Common approaches that don't work:
-
60% fail
User is not created, no feedback to user.
-
70% fail
Allows duplicate emails, breaking user identification.