dj-stripe / dj-stripe

dj-stripe automatically syncs your Stripe Data to your local database as pre-implemented Django Models allowing you to use the Django ORM, in your code, to work with the data making it easier and faster.
https://dj-stripe.dev
MIT License
1.56k stars 474 forks source link

Djstripe fails to retrieve related objects from connected accounts #2010

Open arnav13081994 opened 6 months ago

arnav13081994 commented 6 months ago

Describe the bug

When a JSON is returned that references objects on the connected accounts, dj-stripe incorrectly tries to retrieve them from the platform accounts causing the webhook sync to fail. This, however, is usually not a problem on production as Stripe usually retries webhooks a couple of times and in the next re-try because the object, on the connected account is already in the db (from its own connect webhook), the sync works, just fine.

Software versions

Steps To Reproduce

Follow steps listed in issue #1777

Can you reproduce the issue with the latest version of master?

Yes

Expected Behavior

Ideally the webhook sync should not fail.

Actual Behavior