diff --git a/helios/models.py b/helios/models.py index 085db4e0ee047e2f80b9bd9f2a22c39d8af883eb..64733fa48aa29ebb912b5b3d4bc26f4b7db5ed41 100644 --- a/helios/models.py +++ b/helios/models.py @@ -265,7 +265,7 @@ class Election(HeliosModel): return [] # constraints that are relevant - relevant_constraints = [constraint['constraint'] for constraint in self.eligibility if constraint['auth_system'] == user_type] + relevant_constraints = [constraint['constraint'] for constraint in self.eligibility if constraint['auth_system'] == user_type and constraint.has_key('constraint')] if len(relevant_constraints) > 0: return relevant_constraints[0] else: