1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fix api's document change.

This commit is contained in:
eternnoir 2015-07-15 11:02:30 +08:00
parent 56d1dfc045
commit aeeb94d386

View File

@ -228,8 +228,9 @@ class Document(JsonDeserializable):
obj = cls.check_json(json_string) obj = cls.check_json(json_string)
file_id = obj['file_id'] file_id = obj['file_id']
thumb = None thumb = None
if 'file_id' in obj['thumb']: if 'thumb' in obj:
thumb = PhotoSize.de_json(obj['thumb']) if 'file_id' in obj['thumb']:
thumb = PhotoSize.de_json(obj['thumb'])
file_name = None file_name = None
mime_type = None mime_type = None
file_size = None file_size = None