Skip to content

Commit a03b861

Browse files
authored
Merge pull request #313 from iarp/no-such-customer-err
stripes exception message changed, instead of startswith need to see …
2 parents 5168b90 + fbb6e99 commit a03b861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pinax/stripe/actions/customers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def purge(customer):
9393
try:
9494
customer.stripe_customer.delete()
9595
except stripe.InvalidRequestError as e:
96-
if not smart_str(e).startswith("No such customer:"):
96+
if 'no such customer:' not in smart_str(e).lower():
9797
# The exception was thrown because the customer was already
9898
# deleted on the stripe side, ignore the exception
9999
raise

0 commit comments

Comments
 (0)