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:
Eldinnie 2017-08-04 23:02:51 +02:00 committed by Noam Meltzer
parent 073bed3a01
commit 8d4b484f7b

View file

@ -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