Skip to content

Commit 3e41290

Browse files
committed
Fixes #37
1 parent 1d70bfe commit 3e41290

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "ws-api"
7-
version = "0.30.0"
7+
version = "0.30.1"
88
description = "Access your Wealthsimple account using their (GraphQL) API."
99
readme = "README.md"
1010
license = {file = "LICENSE"}

ws_api/wealthsimple_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,15 +688,14 @@ def get_statement_transactions(self, account_id: str, period: str) -> list[Any]:
688688
"array",
689689
)
690690

691+
transactions = []
691692
if isinstance(statements, list) and len(statements) > 0:
692693
statement = statements[0]
693694
data = statement.get("data") if "data" in statement else {}
694695
transactions = (
695696
data.get("currentTransactions") if "currentTransactions" in data else []
696697
)
697698

698-
if not transactions:
699-
return []
700699
if not isinstance(transactions, list):
701700
raise WSApiException(
702701
f"Unexpected response format: {self.get_statement_transactions.__name__}",

0 commit comments

Comments
 (0)