forked from ScoDoc/ScoDoc
bug fix: filtrage par date
This commit is contained in:
parent
345a842f59
commit
104a7058a1
@ -486,13 +486,13 @@ def _count_manager(requested) -> tuple[str, dict]:
|
||||
filtered["etat"] = etat
|
||||
|
||||
# cas 2 : date de début
|
||||
deb = requested.args.get("date_debut")
|
||||
deb = requested.args.get("date_debut", "").replace(" ", "+")
|
||||
deb: datetime = scu.is_iso_formated(deb, True)
|
||||
if deb is not None:
|
||||
filtered["date_debut"] = deb
|
||||
|
||||
# cas 3 : date de fin
|
||||
fin = requested.args.get("date_fin")
|
||||
fin = requested.args.get("date_fin", "").replace(" ", "+")
|
||||
fin = scu.is_iso_formated(fin, True)
|
||||
|
||||
if fin is not None:
|
||||
@ -538,12 +538,12 @@ def _filter_manager(requested, assiduites_query: Assiduite):
|
||||
assiduites_query = scass.filter_assiduites_by_etat(assiduites_query, etat)
|
||||
|
||||
# cas 2 : date de début
|
||||
deb = requested.args.get("date_debut")
|
||||
deb = requested.args.get("date_debut", "").replace(" ", "+")
|
||||
deb: datetime = scu.is_iso_formated(deb, True)
|
||||
|
||||
# cas 3 : date de fin
|
||||
fin = requested.args.get("date_fin")
|
||||
fin = scu.is_iso_formated(fin, True)
|
||||
fin = requested.args.get("date_fin", "")
|
||||
fin = scu.is_iso_formated(fin, True).replace(" ", "+")
|
||||
|
||||
if (deb, fin) != (None, None):
|
||||
assiduites_query: Assiduite = scass.filter_by_date(
|
||||
|
Loading…
Reference in New Issue
Block a user