Add support for displaying Page object
This commit is contained in:
parent
7ba2408c8d
commit
4a975dcbfa
4 changed files with 25 additions and 9 deletions
|
@ -315,7 +315,9 @@ def _timeago(original_dt: datetime) -> str:
|
|||
|
||||
|
||||
def _has_media_type(attachment: Attachment, media_type_prefix: str) -> bool:
|
||||
return attachment.media_type.startswith(media_type_prefix)
|
||||
if attachment.media_type:
|
||||
return attachment.media_type.startswith(media_type_prefix)
|
||||
return False
|
||||
|
||||
|
||||
def _format_date(dt: datetime) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue