Stripe: Fix handling of charges without source

This commit is contained in:
Raphael Michel
2021-11-04 18:21:29 +01:00
parent c1994e89a5
commit f64a42d61a

View File

@@ -196,7 +196,7 @@ def webhook(request, *args, **kwargs):
objid = event_json['data']['object']['id'] objid = event_json['data']['object']['id']
lookup_ids = [ lookup_ids = [
objid, objid,
event_json['data']['object'].get('source', {}).get('id') (event_json['data']['object'].get('source') or {}).get('id')
] ]
elif event_json['data']['object']['object'] == "dispute": elif event_json['data']['object']['object'] == "dispute":
func = charge_webhook func = charge_webhook