Skip to content

Commit

Permalink
feat(vote): add elected filter like default in candidature search
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Nov 4, 2024
1 parent 9973713 commit bc7e03d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class FilterFormSidebar(RemoveRequiredMixin, forms.ModelForm):
("elected", "Candidaturas eleitas")
],
widget=ButtonRadioSelect,
initial="second_round" # Define o filtro de 2º turno como padrão
initial="elected" # Define o filtro de eleito como padrão
)
proposes = forms.MultipleChoiceField(
label="Propostas", widget=ButtonCheckboxSelectMultiple
Expand Down
4 changes: 2 additions & 2 deletions app/org_eleicoes/votepeloclima/candidature/views/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def get_queryset(self):
)
)

election_status = cleaned_data.get("election_status", "second_round")
election_status = cleaned_data.get("election_status", "elected")
else:
election_status = "second_round"
election_status = "elected"

# Filtra com base no status da eleição
if election_status == "second_round":
Expand Down

0 comments on commit bc7e03d

Please sign in to comment.