mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Stripe: Catch exceptions when filling countries
This commit is contained in:
@@ -22,8 +22,12 @@ class Command(BaseCommand):
|
||||
if uid in cache:
|
||||
e.settings.payment_stripe_merchant_country = cache[uid]
|
||||
else:
|
||||
account = stripe.Account.retrieve(
|
||||
uid,
|
||||
api_key=api_key
|
||||
)
|
||||
e.settings.payment_stripe_merchant_country = cache[uid] = account.get('country')
|
||||
try:
|
||||
account = stripe.Account.retrieve(
|
||||
uid,
|
||||
api_key=api_key
|
||||
)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
else:
|
||||
e.settings.payment_stripe_merchant_country = cache[uid] = account.get('country')
|
||||
|
||||
Reference in New Issue
Block a user