From b145fc8e2e2f763e388f44d2c8237632ec8a07f0 Mon Sep 17 00:00:00 2001 From: Evarin Date: Tue, 20 Jun 2017 00:24:48 +0200 Subject: [PATCH] Dedebug filtre recherche annee_scol --- avisstage/views_search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'):