Skip to content

Commit

Permalink
fix: conditional parsing of optional values
Browse files Browse the repository at this point in the history
  • Loading branch information
nohr-ai committed Oct 2, 2023
1 parent 51f527e commit e507948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion masterblaster/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(
self.name: str = name
self.player_id: str = playerId
self.role: int = role
self.added_at: datetime = parser.isoparse(addedAt)
self.added_at: datetime = parser.isoparse(addedAt) if addedAt else None
self.invited_at: Optional[datetime] = (
None if not invitedAt else parser.isoparse(invitedAt)
)
Expand Down

0 comments on commit e507948

Please sign in to comment.