Skip to content

Commit

Permalink
Show candidates list
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Nov 17, 2024
1 parent c3f84df commit 62a2311
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backend/hub/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def get_candidates_to_vote(cls):
)

@classmethod
def get_candidates_to_support(cls):
def get_candidates_pending(cls):
return Candidate.objects_with_org.filter(
org__status=Organization.STATUS.accepted,
is_proposed=True,
Expand All @@ -542,10 +542,11 @@ def get_candidates_to_support(cls):
def get_qs(self):
if FeatureFlag.flag_enabled(FLAG_CHOICES.enable_candidate_voting):
return self.get_candidates_to_vote()
elif FeatureFlag.flag_enabled(FLAG_CHOICES.enable_candidate_supporting):
return self.get_candidates_to_support()

return Candidate.objects_with_org.none()
if FeatureFlag.flag_enabled(FLAG_CHOICES.enable_results_display):
return Candidate.objects_with_org.none()

return self.get_candidates_pending()

def get_queryset(self):
qs = self.search(self.get_qs())
Expand Down

0 comments on commit 62a2311

Please sign in to comment.