diff --git a/avisstage/views_search.py b/avisstage/views_search.py index 3c56a7c..070af3a 100644 --- a/avisstage/views_search.py +++ b/avisstage/views_search.py @@ -25,7 +25,7 @@ class SearchForm(forms.Form): type_stage = forms.ChoiceField(label="Type de stage", choices=([('', u'')] + list(TYPE_STAGE_OPTIONS)), required=False) - annee_scol = forms.ChoiceField(label="Année d'étude", choices=([('', u'')] + niveau_scol = forms.ChoiceField(label="Année d'étude", choices=([('', u'')] + list(NIVEAU_SCOL_OPTIONS)), required=False) @@ -97,8 +97,8 @@ def cherche(**kwargs): if field_relevant('type_stage'): filtres &= Q(type_stage=kwargs["type_stage"]) - if field_relevant('annee_scol'): - filtres &= Q(annee_scol=kwargs["annee_scol"]) + if field_relevant('niveau_scol'): + filtres &= Q(niveau_scol=kwargs["niveau_scol"]) # Type de lieu if field_relevant('type_lieu'):