Ignore non string attachment mimetypes (#429)
This commit is contained in:
parent
50f8c8040d
commit
77ba7b02b9
|
@ -843,7 +843,7 @@ class Post(StatorModel):
|
|||
else:
|
||||
focal_x, focal_y = None, None
|
||||
mimetype = attachment.get("mediaType")
|
||||
if not mimetype:
|
||||
if not mimetype or not isinstance(mimetype, str):
|
||||
mimetype, _ = mimetypes.guess_type(attachment["url"])
|
||||
if not mimetype:
|
||||
mimetype = "application/octet-stream"
|
||||
|
|
Loading…
Reference in New Issue