From f764d245f512e3abfd106f6120263538182c5bd3 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 25 Dec 2020 00:05:49 +0100 Subject: [PATCH] Fix bad mime_type default value in case it doesn't exist --- pyrogram/methods/messages/download_media.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/messages/download_media.py b/pyrogram/methods/messages/download_media.py index 40530104..c71247d4 100644 --- a/pyrogram/methods/messages/download_media.py +++ b/pyrogram/methods/messages/download_media.py @@ -124,7 +124,7 @@ class DownloadMedia(Scaffold): file_type = file_id_obj.file_type media_file_name = getattr(media, "file_name", "") 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) directory, file_name = os.path.split(file_name)