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 "monetization_stripecharge_charge_id_3a52ad51_uniq" #2752

Open
sentry-io bot opened this issue May 17, 2024 · 0 comments

Comments

@sentry-io
Copy link

sentry-io bot commented May 17, 2024

Sentry Issue: APPLICATION-BACKEND-6GC

UniqueViolation: duplicate key value violates unique constraint "monetization_stripecharge_charge_id_3a52ad51_uniq"
DETAIL:  Key (charge_id)=(ch_3PHEy0KkW65XrgwB1l62TwyP) already exists.

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

IntegrityError: duplicate key value violates unique constraint "monetization_stripecharge_charge_id_3a52ad51_uniq"
DETAIL:  Key (charge_id)=(ch_3PHEy0KkW65XrgwB1l62TwyP) already exists.

(9 additional frame(s) were not displayed)
...
  File "monetization/models/event/actions.py", line 190, in process
    event.status = handle(event, generate_dependencies=generate_dependencies)
  File "monetization/models/event/actions.py", line 155, in handle
    event_handler.handle(reconstructed_event.data.object, event.account.account_id)
  File "monetization/events/charge_succeeded.py", line 68, in handle
    return batch_handle([charge], account_id)[0]
  File "monetization/events/charge_succeeded.py", line 64, in batch_handle
    return list(relevant_charges) + StripeCharge.objects.bulk_create(new_charges)
@sentry-io sentry-io bot added bug labels May 17, 2024
@jmduke jmduke removed bug labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant