Open
Description
Describe the bug
Account
class has tos_acceptance: Optional[TosAcceptance]
.
TosAcceptance
class has service_agreement: Optional[str]
The following code:
if (
connected_account.tos_acceptance is not None
and connected_account.tos_acceptance.service_agreement == "recipient"
):
Should not rais exceptions, but it does:
AttributeError: service_agreement
To Reproduce
- Fetch the account with non-recipient service agreement
- Run the above
if
statementthe
Expected behavior
Exception should not be raised
Code snippets
No response
OS
macOS
Language version
3.11.4
Library version
8.1.0
API version
2019-08-14
Additional context
No response