feat(observatoire): filtres d'égalité simples dans dashboard_filters_to_sql (#72)

This commit is contained in:
Colin Maudry
2026-04-22 23:39:13 +02:00
parent 653999693c
commit a382370767
2 changed files with 51 additions and 0 deletions
+15
View File
@@ -134,4 +134,19 @@ def dashboard_filters_to_sql(
clauses.append('"dateNotification" > ?')
params.append(datetime.now() - timedelta(days=365))
if dashboard_marche_type:
clauses.append('"type" = ?')
params.append(dashboard_marche_type)
if dashboard_marche_innovant and dashboard_marche_innovant != "all":
clauses.append('"marcheInnovant" = ?')
params.append(dashboard_marche_innovant)
if (
dashboard_marche_sous_traitance_declaree
and dashboard_marche_sous_traitance_declaree != "all"
):
clauses.append('"sousTraitanceDeclaree" = ?')
params.append(dashboard_marche_sous_traitance_declaree)
return " AND ".join(clauses), params