mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-27 08:50:38 +01:00
bugfixes on error in answer_shipping_query and answer_precheckout_query
This commit is contained in:
parent
ad603bd2f9
commit
a68e0ad044
1 changed files with 2 additions and 2 deletions
|
@ -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 '
|
||||
|
|
Loading…
Add table
Reference in a new issue