mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fixed KeyError when data field is None in CallbackQuery
obj['data'] raises KeyError when `data` is None, while obj.get('data') returns None
This commit is contained in:
parent
34b0a2404e
commit
2af9209005
@ -762,7 +762,7 @@ class CallbackQuery(JsonDeserializable):
|
||||
message = Message.de_json(obj['message'])
|
||||
inline_message_id = obj.get('inline_message_id')
|
||||
chat_instance = obj['chat_instance']
|
||||
data = obj['data']
|
||||
data = obj.get('data')
|
||||
game_short_name = obj.get('game_short_name')
|
||||
return cls(id, from_user, data, chat_instance, message, inline_message_id, game_short_name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user