You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to 0.1.2 I started to see errors with every new subscription:
IntegrityError at /paddle/webhook/
(1062, "Duplicate entry 'xxxxxxx' for key 'PRIMARY'")
It turns out the problem is that now both subscription_payment_succeeded and subscription_created try to create a new subscription entry in the database in parallel. subscription_payment_succeeded was added to the subscription_event with 0.1.2.
The code documentation for Subscription does not mention subscription_payment_succeeded as possible trigger.
Fortunately, the problem is not severe, as the first webhook invocation (subscription_created) will succeed at creating the subscription. The second call will fail with no consequence, the retry from Paddle will then succeed when the Subscription instance can already be found in the database.
Description
After upgrading to 0.1.2 I started to see errors with every new subscription:
It turns out the problem is that now both
subscription_payment_succeeded
andsubscription_created
try to create a new subscription entry in the database in parallel.subscription_payment_succeeded
was added to thesubscription_event
with 0.1.2.The code documentation for
Subscription
does not mentionsubscription_payment_succeeded
as possible trigger.Fortunately, the problem is not severe, as the first webhook invocation (
subscription_created
) will succeed at creating the subscription. The second call will fail with no consequence, the retry from Paddle will then succeed when theSubscription
instance can already be found in the database.A
get_or_create
should solve the problem here:The text was updated successfully, but these errors were encountered: