Skip to content

Commit f7d94fb

Browse files
Fix send_poll
1 parent 304cfec commit f7d94fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyrogram/methods/messages/send_poll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ async def send_poll(
236236
hash=self.rnd_id(),
237237
closed=is_closed,
238238
public_voters=not is_anonymous,
239-
multiple_choice=True if len(correct_option_ids) > 1 else allows_multiple_answers,
239+
multiple_choice=True if correct_option_ids and len(correct_option_ids) > 1 else allows_multiple_answers,
240240
quiz=type == enums.PollType.QUIZ or False,
241241
open_answers=False if type == enums.PollType.QUIZ and allow_adding_options else allow_adding_options,
242242
revoting_disabled=not allows_revoting if allows_revoting is not None else (type == enums.PollType.QUIZ),
@@ -247,7 +247,7 @@ async def send_poll(
247247
),
248248
correct_answers=correct_option_ids,
249249
solution=solution,
250-
solution_entities=solution_entities or None
250+
solution_entities=solution_entities
251251
),
252252
message=message or "",
253253
entities=entities or None,

0 commit comments

Comments
 (0)