From 8f1f251cffdd62a66c4232b0d528aa1a09f8e2b4 Mon Sep 17 00:00:00 2001 From: Sharun Kumar <715417+sharunkumar@users.noreply.github.com> Date: Sat, 8 Feb 2020 22:56:27 +0530 Subject: [PATCH] correct_option_id validated with None when trying to send a poll with correct option id 0 it was failing. Now None check is done so that even when 0 is passed it is assigned. --- telegram/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/bot.py b/telegram/bot.py index dc32493aa33..1c94a76d483 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -3435,7 +3435,7 @@ def send_poll(self, data['type'] = type if allows_multiple_answers: data['allows_multiple_answers'] = allows_multiple_answers - if correct_option_id: + if correct_option_id is not None: data['correct_option_id'] = correct_option_id if is_closed: data['is_closed'] = is_closed