From 7346326bc3400d57714289a9ceacccf3ea2e98f1 Mon Sep 17 00:00:00 2001 From: eternnoir Date: Sat, 17 Oct 2015 02:30:22 +0800 Subject: [PATCH] Fix video's thumb type forgot de_json. --- telebot/types.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telebot/types.py b/telebot/types.py index 5de17ae..c262663 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -342,7 +342,9 @@ class Video(JsonDeserializable): width = obj['width'] height = obj['height'] duration = obj['duration'] - thumb = obj.get('thumb') + thumb = None + if 'thumb' in obj: + thumb = PhotoSize.de_json(obj['thumb']) mime_type = obj.get('mime_type') file_size = obj.get('file_size') return cls(file_id, width, height, duration, thumb, mime_type, file_size)