mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
Should fix empty string but set args #232
This commit is contained in:
parent
bb36c725af
commit
3be8b9ecb9
2 changed files with 4 additions and 4 deletions
|
@ -65,7 +65,7 @@ class TelegramObject(object):
|
|||
data = dict()
|
||||
|
||||
for key, value in self.__dict__.items():
|
||||
if value:
|
||||
if value or value == '':
|
||||
if hasattr(value, 'to_dict'):
|
||||
data[key] = value.to_dict()
|
||||
else:
|
||||
|
|
|
@ -50,9 +50,9 @@ class InlineKeyboardButton(TelegramObject):
|
|||
self.text = text
|
||||
|
||||
# Optionals
|
||||
self.url = kwargs.get('url', '')
|
||||
self.callback_data = kwargs.get('callback_data', '')
|
||||
self.switch_inline_query = kwargs.get('switch_inline_query', '')
|
||||
self.url = kwargs.get('url')
|
||||
self.callback_data = kwargs.get('callback_data')
|
||||
self.switch_inline_query = kwargs.get('switch_inline_query')
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
|
|
Loading…
Add table
Reference in a new issue