Skip to content

Commit

Permalink
Refactor uploaded_at attribute to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorflahardy committed Mar 21, 2024
1 parent 64af0a1 commit 976c897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tixte/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def __init__(self, *, state: State, data: Dict[Any, Any]) -> None:
self.extension: str = data['extension']
self.url: str = data.get('url') or f'https://{self.domain_url}/{self.name}.{self.extension}'
self.direct_url: Optional[str] = data.get('direct_url')
self.uploaded_at: datetime.datetime = parse_time(data['uploaded_at'])
self.uploaded_at: Optional[datetime.datetime] = parse_time(data.get('uploaded_at'))
self.size: Optional[int] = data.get('size')
self.mimetype: Optional[str] = data.get('mimetype')

Expand Down

0 comments on commit 976c897

Please sign in to comment.