From a68e0ad04468b00341f7efafa2bfa8afa844a699 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 11 Jun 2017 03:45:48 +0800 Subject: [PATCH] bugfixes on error in answer_shipping_query and answer_precheckout_query --- telegram/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram/bot.py b/telegram/bot.py index fb50b055d..24d2c31b5 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -1975,7 +1975,7 @@ class Bot(TelegramObject): data = {'shipping_query_id': shipping_query_id, 'ok': ok} if ok is True: - data['shipping_options'] = shipping_options + data['shipping_options'] = [option.to_dict() for option in shipping_options] if error_message is not None: data['error_message'] = error_message @@ -2009,7 +2009,7 @@ class Bot(TelegramObject): """ - if not (ok ^ (error_message is None)): + if not (ok ^ (error_message is not None)): raise TelegramError( 'answerPreCheckoutQuery: If ok is True, there should ' 'not be error_message; if ok is False, error_message '