From e5079480d0161ed889256d15128af5835ff1d3c4 Mon Sep 17 00:00:00 2001 From: askepios-ai Date: Mon, 2 Oct 2023 17:02:22 +0200 Subject: [PATCH] fix: conditional parsing of optional values --- masterblaster/member.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/masterblaster/member.py b/masterblaster/member.py index 5c49d45..48fd03c 100644 --- a/masterblaster/member.py +++ b/masterblaster/member.py @@ -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) )