Skip to content

Commit

Permalink
Fix boolean parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official committed Jun 23, 2022
1 parent 8769802 commit 1342cab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ def create_invoice_link(token, title, description, payload, provider_token,
payload['send_phone_number_to_provider'] = send_phone_number_to_provider
if send_email_to_provider:
payload['send_email_to_provider'] = send_email_to_provider
if is_flexible:
if is_flexible is not None:
payload['is_flexible'] = is_flexible
return _make_request(token, method_url, params=payload, method='post')

Expand Down
2 changes: 1 addition & 1 deletion telebot/asyncio_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ async def create_invoice_link(token, title, description, payload, provider_token
payload['send_phone_number_to_provider'] = send_phone_number_to_provider
if send_email_to_provider:
payload['send_email_to_provider'] = send_email_to_provider
if is_flexible:
if is_flexible is not None:
payload['is_flexible'] = is_flexible
return await _process_request(token, method_url, params=payload, method='post')

Expand Down

0 comments on commit 1342cab

Please sign in to comment.