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 "contentcuration_user_email_key" #4779

Open
sentry-io bot opened this issue Oct 8, 2024 · 1 comment
Assignees
Labels

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 8, 2024

From @bjester:
We should have proper defensive checks on user creation such that attempting to create a user with a duplicate email address doesn't fail and produce a 500 error. This could have come from a race condition (double submit). We should evaluate what happened and do what we can to ensure we don't get these errors.

Related to: https://learningequality.sentry.io/issues/5955562525/?alert_rule_id=478560&alert_type=issue&notification_uuid=41f27029-564a-4a93-b3cc-d7239147f02f&project=1252819&referrer=slack


Sentry Issue: STUDIO-HFD

UniqueViolation: duplicate key value violates unique constraint "contentcuration_user_email_key"
DETAIL:  Key (email)=([email protected]) already exists.

  File "django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "django_prometheus/db/common.py", line 69, in execute
    return super().execute(*args, **kwargs)

IntegrityError: duplicate key value violates unique constraint "contentcuration_user_email_key"
DETAIL:  Key (email)=([email protected]) already exists.

(22 additional frame(s) were not displayed)
...
  File "contentcuration/views/users.py", line 172, in form_valid
    self.register(form)
  File "contentcuration/models.py", line 393, in save
    super(User, self).save(*args, **kwargs)
@ozer550
Copy link
Member

ozer550 commented Nov 8, 2024

Supporting @akolson on this. Self-assigning myself.

@ozer550 ozer550 self-assigned this Nov 8, 2024
@akolson akolson removed their assignment Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants