Fix bad mime_type default value in case it doesn't exist
This commit is contained in:
parent
34f62b9c67
commit
f764d245f5
@ -124,7 +124,7 @@ class DownloadMedia(Scaffold):
|
|||||||
file_type = file_id_obj.file_type
|
file_type = file_id_obj.file_type
|
||||||
media_file_name = getattr(media, "file_name", "")
|
media_file_name = getattr(media, "file_name", "")
|
||||||
file_size = getattr(media, "file_size", 0)
|
file_size = getattr(media, "file_size", 0)
|
||||||
mime_type = getattr(media, "mime_type", None)
|
mime_type = getattr(media, "mime_type", "")
|
||||||
date = getattr(media, "date", 0)
|
date = getattr(media, "date", 0)
|
||||||
|
|
||||||
directory, file_name = os.path.split(file_name)
|
directory, file_name = os.path.split(file_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user