mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-19 15:43:24 +01:00
Fix Game.to_dict() (#767)
`Game.to_dict()` fails if the `optional` parameter `test_entities` has it's default value `None` This fixes that.
This commit is contained in:
parent
073bed3a01
commit
8d4b484f7b
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ class Game(TelegramObject):
|
|||
data = super(Game, self).to_dict()
|
||||
|
||||
data['photo'] = [p.to_dict() for p in self.photo]
|
||||
data['text_entities'] = [x.to_dict() for x in self.text_entities]
|
||||
if self.text_entities:
|
||||
data['text_entities'] = [x.to_dict() for x in self.text_entities]
|
||||
|
||||
return data
|
||||
|
||||
|
|
Loading…
Reference in a new issue