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

IntegrityError: duplicate key value violates unique constraint "core_user_username_key" #467

Open
ae-utbm-sentry bot opened this issue Sep 1, 2022 · 4 comments
Labels
severity: critical The issue causes data loss, crashes or makes the system unresponsive, etc status: approved The issue has been verified and is ready to be worked on type: bug The issue documents broken, incorrect, or confusing behavior

Comments

@ae-utbm-sentry
Copy link

ae-utbm-sentry bot commented Sep 1, 2022

UniqueViolation: duplicate key value violates unique constraint "core_user_username_key"
DETAIL:  Key (username)=(***) already exists.

  File "django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)

IntegrityError: duplicate key value violates unique constraint "core_user_username_key"
DETAIL:  Key (username)=(***) already exists.

(21 additional frame(s) were not displayed)
...
  File "django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "django/db/backends/utils.py", line 79, in _execute
    with self.db.wrap_database_errors:
  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 84, in _execute
    return self.cursor.execute(sql, params)
@TheoDurr TheoDurr added severity: critical The issue causes data loss, crashes or makes the system unresponsive, etc type: bug The issue documents broken, incorrect, or confusing behavior missing reproducible steps labels Sep 1, 2022
@TheoDurr
Copy link
Contributor

TheoDurr commented Sep 1, 2022

Happens when the "save" button is pressed multiple times.

CleanShot 2022-09-01 at 16 25 02

Needs to handle this case.

@TheoDurr TheoDurr added status: approved The issue has been verified and is ready to be worked on and removed missing reproducible steps labels Sep 1, 2022
@TheoDurr
Copy link
Contributor

TheoDurr commented Sep 2, 2022

Il faudrait trouver un moyen de simuler la lenteur sur l'environnement local

@TheRolfFR
Copy link
Contributor

Pour ça faudrait mock des délais mais après c'est pas vraiment un bug dans le sens où la bdd et les contraintes sont permettent de prévenir des doublons

@TheoDurr
Copy link
Contributor

TheoDurr commented Sep 2, 2022

Pour ça faudrait mock des délais mais après c'est pas vraiment un bug dans le sens où la bdd et les contraintes sont permettent de prévenir des doublons

Je suis bien d'accord, mais l'utilisateur se prend une erreur 500. Donc c'est un bug dans le sens où on ne prend pas en compte ce cas.

@Juknum Juknum added this to Sith v3 Dec 12, 2022
@Juknum Juknum moved this to Todo in Sith v3 Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: critical The issue causes data loss, crashes or makes the system unresponsive, etc status: approved The issue has been verified and is ready to be worked on type: bug The issue documents broken, incorrect, or confusing behavior
Projects
Status: Todo
Development

No branches or pull requests

2 participants