Skip to content

Commit 1e51bb1

Browse files
authored
Merge pull request #25 from Deigue/main
Handle no monthly txns gracefully
2 parents e80f243 + 43134ee commit 1e51bb1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ws_api/wealthsimple_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,8 @@ def get_statement_transactions(self, account_id: str, period: str) -> list[Any]:
805805
data = statement.get('data') if 'data' in statement else {}
806806
transactions = data.get('currentTransactions') if 'currentTransactions' in data else []
807807

808-
808+
if not transactions:
809+
return []
809810
if not isinstance(transactions, list):
810811
raise WSApiException(f"Unexpected response format: {self.get_statement_transactions.__name__}", transactions)
811812

0 commit comments

Comments
 (0)