Skip to content

AttributeError: service_agreement #1227

Open
@pslowinski-wn

Description

@pslowinski-wn

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

  1. Fetch the account with non-recipient service agreement
  2. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions