From 737302e1c18c71ac55c7e241c8ef30003ad64f97 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 28 Jun 2024 23:25:19 +0300 Subject: Fix issue where 0 votes would be marked as most voted --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 021cec7..c32afe2 100644 --- a/app.py +++ b/app.py @@ -164,7 +164,7 @@ def poll(id): voter_names.sort() most_voted_choice_ids: set[str] = set() - most_voted_value = 0 + most_voted_value = 1 # start from 1 to avoid marking 0 votes as most voted for choice in poll.choices: n_votes = 0 for vote in choice.votes: -- cgit v1.3