Skip to content

Commit

Permalink
Logged warning to console if Business icon and/or logo cannot be retr…
Browse files Browse the repository at this point in the history
…ieved
  • Loading branch information
arnav13081994 authored and jleclanche committed Aug 1, 2021
1 parent bd2d493 commit 9b2f23f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions djstripe/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ..fields import JSONField, StripeCurrencyCodeField, StripeEnumField
from ..settings import djstripe_settings
from .api import APIKey
from .base import StripeModel
from .base import StripeModel, logger


class Account(StripeModel):
Expand Down Expand Up @@ -201,7 +201,9 @@ def _attach_objects_post_save_hook(self, cls, data, pending_relations=None):
)
except stripe.error.PermissionError:
# No permission to retrieve the data with the key
pass
logger.warning(
f"Cannot retrieve business branding {field} for acct {self.id} with the key."
)
except stripe.error.InvalidRequestError as e:
if "a similar object exists in" in str(e):
# HACK around a Stripe bug.
Expand Down

0 comments on commit 9b2f23f

Please sign in to comment.