Skip to content

Commit

Permalink
🐛 optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Dec 15, 2023
1 parent 60d1c9c commit 283df1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lunchable/models/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class CryptoObject(LunchableModel):
)
currency: Optional[str] = Field(description="Abbreviation for the cryptocurrency")
status: Optional[str] = Field(description=_status_description)
institution_name: str = Field(description="Name of provider holding the asset")
institution_name: Optional[str] = Field(
default=None, description="Name of provider holding the asset"
)
created_at: datetime.datetime = Field(description=_created_at_description)


Expand Down
4 changes: 3 additions & 1 deletion lunchable/models/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ class TransactionSplitObject(TransactionBaseObject):
"""

date: datetime.date = Field(description=_date_description)
category_id: int = Field(description=_category_id_description)
category_id: Optional[int] = Field(
default=None, description=_category_id_description
)
notes: Optional[str] = Field(description=_notes_description)
amount: float = Field(description=_amount_description)

Expand Down

0 comments on commit 283df1a

Please sign in to comment.