File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ def build(self):
109109 self .election ['key' ] = self .key
110110 self .election ['description' ] = self .description ()
111111 self .election ['results' ] = self .results ()
112+ self .election ['election_officers' ] = [election_officer .lower () for election_officer in self .election ['election_offiers' ]]
112113
113114 if 'exception_due' not in self .election .keys ():
114115 self .election ['exception_due' ] = self .election ['start_datetime' ]
@@ -133,7 +134,9 @@ def results(self):
133134 return utils .parse_md (os .path .join (self .path , Election .RES ))
134135
135136 def voters (self ):
136- return utils .parse_yaml (os .path .join (self .path , Election .VOT ))
137+ voters = utils .parse_yaml (os .path .join (self .path , Election .VOT ))
138+ voters ['eligible_voters' ] = [voter .lower () for voter in voters ['eligible_voters' ]]
139+ return voters
137140
138141 def showfields (self ):
139142 return dict .fromkeys (self .election ['show_candidate_fields' ], '' )
@@ -148,6 +151,7 @@ def candidates(self):
148151 md = open (os .path .join (self .path , f )).read ()
149152 try :
150153 c = utils .extract_candidate_info (md )
154+ c ['ID' ] = c ['ID' ].lower ()
151155 c ['key' ] = c ['ID' ]
152156 candidates .append (c )
153157 except :
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ def set_session(app):
3838 # if unable to fetch the user's info, set auth to False
3939 if user and user .token_expires_at and user .token_expires_at > datetime .now ():
4040 F .g .user = user
41+ F .g .user .username = F .g .user .username .lower ()
4142 F .g .auth = True
4243 # Find all the user's past and all upcoming (meta only) elections
4344 query = SESSION .query (Election ).join (
You can’t perform that action at this time.
0 commit comments