IntegrityError when using manage.py createsuperuser with an email that already exists
Sentry Issue: ARKINDEX-BACKEND-14D
Upstream issue: https://code.djangoproject.com/ticket/33613
Upstream PR: https://github.com/django/django/pull/15560
UniqueViolation: duplicate key value violates unique constraint "email_unique"
DETAIL: Key (email)=(tlavigne@teklia.com) already exists.
File "django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "email_unique"
DETAIL: Key (email)=(tlavigne@teklia.com) already exists.
(17 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)