mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
bot: 'if X is not None' is cleaner approach
This commit is contained in:
parent
f107070db2
commit
49385493f4
1 changed files with 2 additions and 2 deletions
|
@ -919,7 +919,7 @@ class Bot(TelegramObject):
|
|||
data['cache_time'] = cache_time
|
||||
if is_personal:
|
||||
data['is_personal'] = is_personal
|
||||
if next_offset or next_offset == '':
|
||||
if next_offset is not None:
|
||||
data['next_offset'] = next_offset
|
||||
if switch_pm_text:
|
||||
data['switch_pm_text'] = switch_pm_text
|
||||
|
@ -1443,7 +1443,7 @@ class Bot(TelegramObject):
|
|||
|
||||
data = {}
|
||||
|
||||
if webhook_url or webhook_url == '':
|
||||
if webhook_url is not None:
|
||||
data['url'] = webhook_url
|
||||
if certificate:
|
||||
data['certificate'] = certificate
|
||||
|
|
Loading…
Add table
Reference in a new issue