Skip to content

Commit

Permalink
fix: category_id may be null for subtransactions (Closes #83)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreroggeri committed Mar 9, 2021
1 parent 845d379 commit a0fc1ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ynab_sdk/api/models/responses/budget_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ class Subtransaction:
amount: int
memo: str
payee_id: str
category_id: str
transfer_account_id: str
category_id: Optional[str]
transfer_account_id: Optional[str]
deleted: bool
transaction_id: Optional[str]

Expand All @@ -273,7 +273,7 @@ def from_dict(obj: Any) -> "Subtransaction":
payee_id = parsers.from_union(
[parsers.from_str, parsers.from_none], obj.get("payee_id")
)
category_id = parsers.from_str(obj.get("category_id"))
category_id = parsers.from_str(obj.get("category_id"), True)
transfer_account_id = parsers.from_union(
[parsers.from_str, parsers.from_none], obj.get("transfer_account_id")
)
Expand Down

0 comments on commit a0fc1ad

Please sign in to comment.