webhooks: Handle dispute events with object IDs prefixed with du.

Sometimes the dispute object IDs are prefixed with `du` instead of `dp`.

https://freenode.logbot.info/stripe/20200605#c4059469

The correct long-term fix here would be to stop using object IDs to
detect the object type of these events and instead maybe make use of
"object" key instead.

https://stripe.com/docs/api/disputes/object#dispute_object-object
This commit is contained in:
Vishnu KS
2020-11-16 21:53:52 +05:30
committed by Tim Abbott
parent 8115f8417b
commit 5eb63ddb7a

View File

@@ -212,6 +212,7 @@ def linkified_id(object_id: str, lower: bool=False) -> str:
'ch': ('Charge', 'charges'),
'cus': ('Customer', 'customers'),
'dp': ('Dispute', 'disputes'),
'du': ('Dispute', 'disputes'),
'file': ('File', 'files'),
'link': ('File link', 'file_links'),
'pi': ('Payment intent', 'payment_intents'),