mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-09 19:49:39 +01:00
TelegramObject.to_dict(): cover cases where value is 0 or empty object
This commit is contained in:
parent
3f28633e79
commit
f107070db2
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class TelegramObject(object):
|
||||||
|
|
||||||
for key in iter(self.__dict__):
|
for key in iter(self.__dict__):
|
||||||
value = self.__dict__[key]
|
value = self.__dict__[key]
|
||||||
if value or value == '':
|
if value is not None:
|
||||||
if hasattr(value, 'to_dict'):
|
if hasattr(value, 'to_dict'):
|
||||||
data[key] = value.to_dict()
|
data[key] = value.to_dict()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue