fedora_elections/__init__.py | 2 +-
fedora_elections/admin.py | 4 ++--
fedora_elections/utils.py | 2 +-
files/fedora-elections.spec | 7 ++++++-
4 files changed, 10 insertions(+), 5 deletions(-)
New commits:
commit c26a153e4335bcd7c32d6b0e2b65531629128e84
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Feb 2 15:56:51 2016 +0100
Release 2.6.1
diff --git a/fedora_elections/__init__.py b/fedora_elections/__init__.py
index d40b8c1..eb33131 100644
--- a/fedora_elections/__init__.py
+++ b/fedora_elections/__init__.py
@@ -24,7 +24,7 @@
# Pierre-Yves Chibon <pingou(a)fedoraproject.org>
#
-__version__ = '2.6'
+__version__ = '2.6.1'
import logging
import os
diff --git a/files/fedora-elections.spec b/files/fedora-elections.spec
index e6c3eab..b8e0f7a 100644
--- a/files/fedora-elections.spec
+++ b/files/fedora-elections.spec
@@ -1,7 +1,7 @@
%define modname fedora_elections
Name: fedora-elections
-Version: 2.6
+Version: 2.6.1
Release: 1%{?dist}
Summary: Fedora elections application
@@ -109,6 +109,11 @@ install -m 644 files/update_1_to_2.sql \
%changelog
+* Tue Feb 02 2016 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.6.1-1
+- Update to 2.6.1
+- Fix editing a single candidate when the election asks for the FAS names
+- Fix displaying the candidates' names if the sync with FAS wasn't complete
+
* Mon Feb 01 2016 Pierre-Yves Chibon <pingou(a)pingoured.fr> - 2.6-1
- Update to 2.6
- Add the possibility to change one's vote on an election (Joshua Santos)
commit 61f14601abbea3d88ad6cb7a79327e477b5be60d
Merge: 022191e e162c9f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Feb 2 15:54:37 2016 +0100
Merge pull request #58 from fedora-infra/fix_editing_candidate
Fix editing a single candidate when the election asks for the FAS names
commit e162c9f1539d312461b319b08a553e5519e36b2b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Feb 2 15:51:41 2016 +0100
Use the candidate name in case the sync with FAS wasn't complete
diff --git a/fedora_elections/utils.py b/fedora_elections/utils.py
index a36270f..cc82fc2 100644
--- a/fedora_elections/utils.py
+++ b/fedora_elections/utils.py
@@ -11,6 +11,6 @@ def build_name_map(election):
return {}
return dict([
- (str(candidate.id), candidate.fas_name)
+ (str(candidate.id), candidate.fas_name or candidate.name)
for candidate in election.candidates
])
commit 11e164216789aea05977e75320b33933a81a32c0
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Feb 2 15:48:29 2016 +0100
Fix editing a single candidate when the election asks for the FAS names
diff --git a/fedora_elections/admin.py b/fedora_elections/admin.py
index 98c877c..3dbb24f 100644
--- a/fedora_elections/admin.py
+++ b/fedora_elections/admin.py
@@ -368,12 +368,12 @@ def admin_edit_candidate(election_alias, candidate_id):
if election.candidates_are_fasusers: # pragma: no cover
try:
candidate.fas_name = FAS2.person_by_username(
- candidate[0])['human_name']
+ candidate.name)['human_name']
except (KeyError, AuthError), err:
SESSION.rollback()
flask.flash(
'User `%s` does not have a FAS account.'
- % candidate[0], 'error')
+ % candidate.name, 'error')
return flask.redirect(flask.url_for(
'admin_edit_candidate',
election_alias=election_alias,