Skip to content
Snippets Groups Projects
Commit 7faeac7d authored by Ben Adida's avatar Ben Adida
Browse files

more fixes for category

parent d2875c21
No related branches found
No related tags found
No related merge requests found
...@@ -263,8 +263,12 @@ class Election(HeliosModel): ...@@ -263,8 +263,12 @@ class Election(HeliosModel):
if not self.eligibility: if not self.eligibility:
return None return None
constraint = self.eligibility_constraint_for(user_type)[0] constraint_for = self.eligibility_constraint_for(user_type)
if len(constraint_for) > 0:
constraint = constraint_for[0]
return AUTH_SYSTEMS[user_type].eligibility_category_id(constraint) return AUTH_SYSTEMS[user_type].eligibility_category_id(constraint)
else:
return None
@property @property
def pretty_eligibility(self): def pretty_eligibility(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment