diff options
-rw-r--r-- | stripe/_stripe_object.py | 5 | ||||
-rw-r--r-- | tests/conftest.py | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/stripe/_stripe_object.py b/stripe/_stripe_object.py index 36ac3c15..68a7314c 100644 --- a/stripe/_stripe_object.py +++ b/stripe/_stripe_object.py @@ -169,9 +169,8 @@ class StripeObject(Dict[str, Any]): k = self._field_remappings[k] return self[k] except KeyError as err: - if stripe.absent_as_none: - if k in self.__annotations__: - return None + if stripe.absent_as_none and k in self.__annotations__: + return None raise AttributeError(*err.args) def __delattr__(self, k): diff --git a/tests/conftest.py b/tests/conftest.py index 26600ab7..6bd1ddf6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -73,7 +73,6 @@ def setup_stripe(): stripe.api_key = MOCK_API_KEY stripe.client_id = "ca_123" stripe.default_http_client = http_client - stripe.absent_as_none = True yield http_client.close() stripe.api_base = orig_attrs["api_base"] |