debug search
This commit is contained in:
parent
db1d35fbb6
commit
25f965c750
1 changed files with 4 additions and 2 deletions
|
@ -147,11 +147,11 @@ def cherche(**kwargs):
|
|||
|
||||
# Dates
|
||||
if field_relevant("avant_annee", False):
|
||||
dte = date(kwargs["avant_annee"] + 1, 1, 1)
|
||||
dte = date(min(2100, kwargs["avant_annee"]) + 1, 1, 1)
|
||||
filtres &= Q(date_fin__lt=dte)
|
||||
|
||||
if field_relevant("apres_annee", False):
|
||||
dte = date(kwargs["apres_annee"], 1, 1)
|
||||
dte = date(max(2000, kwargs["apres_annee"]), 1, 1)
|
||||
filtres &= Q(date_debut__gte=dte)
|
||||
|
||||
# Type de stage
|
||||
|
@ -187,6 +187,8 @@ def cherche(**kwargs):
|
|||
)
|
||||
else:
|
||||
resultat = resultat.order_by(tri)
|
||||
else:
|
||||
resultat = resultat.order_by(tri)
|
||||
|
||||
return resultat, tri
|
||||
|
||||
|
|
Loading…
Reference in a new issue