Commit c79985a4 authored by Pierre-antoine Comby's avatar Pierre-antoine Comby

La recherche d'activité se fait sur une année glissante

parent f2ea9df2
......@@ -2905,7 +2905,7 @@ def get_activites(self, data):
condition_clause = "validepar IS NOT NULL" # par défaut, validepar est à NULL
if (term == ""):
search_clause = "extract(year FROM debut)>=extract(year FROM now())"
search_clause = "(DATE_PART('year', debut) - DATE_PART('year',now())) * 12 + (DATE_PART('month', debut) - DATE_PART('month', now())) < 12"
search_clause = "(titre ILIKE '%%%(term)s%%' OR description ILIKE '%%%(term)s%%')"
if self._has_acl("activites"):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment