diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2024-06-28 23:25:19 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-12-21 19:43:13 +0200 |
| commit | 737302e1c18c71ac55c7e241c8ef30003ad64f97 (patch) | |
| tree | 9323fb48b408fdd5c99d92d99f5ae053fcd9271e | |
| parent | 5cc4e8998f31f0063fa71a7a25902a31f12a4a92 (diff) | |
Fix issue where 0 votes would be marked as most voted
| -rw-r--r-- | app.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |
