Skip to content

Commit

Permalink
fixup! CustomerUpdatedWebhook: use provided customer object from the …
Browse files Browse the repository at this point in the history
…event
  • Loading branch information
blueyed committed Sep 21, 2017
1 parent 44a8153 commit f649448
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pinax/stripe/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,11 @@ class CustomerUpdatedWebhook(Webhook):
description = "Occurs whenever any property of a customer changes."

def process_webhook(self):
cu = None
try:
cu = self.event.message['data']['object']
except KeyError:
cu = None
except (KeyError, TypeError):
pass
customers.sync_customer(self.event.customer, cu)


Expand Down

0 comments on commit f649448

Please sign in to comment.