diff --git a/app/api/departements.py b/app/api/departements.py index 04cb8e75e3df165e89f22038c5e7b681d52a0fb8..7d056e4680aaa270c37f53d1a700ae4cbaa52211 100644 --- a/app/api/departements.py +++ b/app/api/departements.py @@ -295,7 +295,7 @@ def dept_formsemestres_courants_by_id(dept_id: int): if date_courante: test_date = datetime.fromisoformat(date_courante) else: - test_date = app.db.func.now() + test_date = db.func.current_date() # Les semestres en cours de ce département formsemestres = FormSemestre.query.filter( FormSemestre.dept_id == dept.id, diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 322958165cc6684c866d9a19b44fbac096e27b95..6cdaef8af176d6ee9157e53f09bcf34964b06ea4 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -673,7 +673,7 @@ class FormSemestre(db.Model): ) -> db.Query: """Liste (query) ordonnée des formsemestres courants, c'est à dire contenant la date courant (si None, la date actuelle)""" - date_courante = date_courante or db.func.now() + date_courante = date_courante or db.func.current_date() # Les semestres en cours de ce département formsemestres = FormSemestre.query.filter( FormSemestre.dept_id == dept.id,