Skip to content

Commit

Permalink
Marking thread fields to Optional to address KeyErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
kraju3 committed Sep 26, 2024
1 parent 220cc27 commit 1b3361c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nylas/models/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ class Thread:
has_drafts: bool
starred: bool
unread: bool
earliest_message_date: int
message_ids: List[str]
folders: List[str]
latest_draft_or_message: Union[Message, Draft] = field(
default=None,
metadata=config(decoder=_decode_draft_or_message)
)
object: str = "thread"
earliest_message_date: Optional[int] = None
latest_message_received_date: Optional[int] = None
draft_ids: Optional[List[str]] = None
snippet: Optional[str] = None
Expand Down

0 comments on commit 1b3361c

Please sign in to comment.