fedora_elections/__init__.py | 2 +-
fedora_elections/models.py | 8 +++-----
fedora_elections/templates/vote_range.html | 2 +-
files/fedora-elections.spec | 7 ++++++-
4 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 656282c5e9514c103779f7a8891d4a9f3263191b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu May 28 11:27:16 2015 +0200
Release 2.5.4
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index 4e6273c..c08a61c 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.5.3'
+__version__ = '2.5.4'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index 96660d9..1fa4d0f 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.5.3
+Version: 2.5.4
Release: 1%{?dist}
Summary: Fedora elections application
@@ -111,6 +111,11 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Thu May 28 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.4-1
+- Update to 2.5.4
+- Fix displaying information about the simplified range voting method
+- Fix setting the max_vote value in the stats dict for the results page
+
* Tue May 05 2015 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.5.3-1
- Update to 2.5.3
- Fix the simplified range voting
commit b1faa6e51e4d527f46cf67a8e4e385a4fde39d44
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu May 21 16:21:59 2015 +0200
Fix setting the max_vote value in the stats dict for the results page
diff --git a/fedora_elections/models.py b/fedora_elections/models.py
index 8f80914..dff7cc4 100644
--- a/fedora_elections/models.py
+++ b/fedora_elections/models.py
@@ -414,14 +414,12 @@ class Vote(BASE):
stats['candidate_voters'] = candidate_voters
stats['n_candidates'] = cnt
- if election.voting_type in ['range', 'select']:
+ stats['max_vote'] = 1
+ if election.voting_type == 'select' \
+ or election.voting_type.startswith('range'):
stats['max_vote'] = cnt
if election.max_votes:
stats['max_vote'] = election.max_votes
- elif election.voting_type == 'simple':
- stats['max_vote'] = 1
- elif election.voting_type == 'irc':
- stats['max_vote'] = 1
dates = election = session.query(
Vote.timestamp
commit d84a4e90c8f1bf8325b7a112f101080bfef2fb90
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue May 5 14:28:23 2015 +0200
Fix displaying information about the simplified range voting method
diff --git a/fedora_elections/templates/vote_range.html
b/fedora_elections/templates/vote_range.html
index 141259e..d8f3458 100644
--- a/fedora_elections/templates/vote_range.html
+++ b/fedora_elections/templates/vote_range.html
@@ -72,7 +72,7 @@
<a
href="http://rangevoting.org/">Center for Range Voting</a>.
</p>
</div>
-{% elif election.voting_type == 'range_3' %}
+{% elif election.voting_type == 'range_simple' %}
<div>
<h2>Information on Simplified Range Voting</h2>
<p>