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 '