From f107070db2f2fc17febe1265048ebe19aa76fb3a Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Mon, 25 Apr 2016 14:30:51 +0300 Subject: [PATCH] TelegramObject.to_dict(): cover cases where value is 0 or empty object --- telegram/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/base.py b/telegram/base.py index db7c231a7..24033c306 100644 --- a/telegram/base.py +++ b/telegram/base.py @@ -66,7 +66,7 @@ class TelegramObject(object): for key in iter(self.__dict__): value = self.__dict__[key] - if value or value == '': + if value is not None: if hasattr(value, 'to_dict'): data[key] = value.to_dict() else: