From 36c41fc9d757d339723938c8c232df03d63e8003 Mon Sep 17 00:00:00 2001 From: Josquin Cornec Date: Mon, 3 Jun 2024 17:55:53 +0200 Subject: [PATCH] fix prod --- pkg/core/score.go | 8 ++++++-- pkg/core/summary.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/core/score.go b/pkg/core/score.go index f9c1159d..0f3c01c4 100644 --- a/pkg/core/score.go +++ b/pkg/core/score.go @@ -33,9 +33,9 @@ type paramsListeScores struct { Filter string `json:"filter"` ExcludeSecteursCovid []string `json:"excludeSecteursCovid"` EtatAdministratif *string `json:"etatAdministratif"` - CreationDateThreshold *string `json:"creationDateThreshold"` FirstAlert *bool `json:"firstAlert"` HasntDelai *bool `json:"hasntDelai"` + CreationDateThreshold *string `json:"creationDateThreshold"` } // Liste de détection @@ -218,7 +218,7 @@ func (liste *Liste) getScores(roles Scope, page int, limit *int, username string liste.Query.IgnoreZone, username, liste.Query.SiegeUniquement, "score", &True, liste.Query.EtatsProcol, liste.Query.Departements, suivi, liste.Query.EffectifMin, liste.Query.EffectifMax, nil, liste.Query.Activites, liste.Query.EffectifMinEntreprise, liste.Query.EffectifMaxEntreprise, liste.Query.CaMin, liste.Query.CaMax, - liste.Query.ExcludeSecteursCovid, liste.Query.EtatAdministratif, liste.Query.CreationDateThreshold, liste.Query.FirstAlert, liste.Query.HasntDelai, + liste.Query.ExcludeSecteursCovid, liste.Query.EtatAdministratif, liste.Query.FirstAlert, liste.Query.HasntDelai, liste.Query.CreationDateThreshold, } summaries, err := getSummaries(params) if err != nil { @@ -362,6 +362,10 @@ func (liste *Liste) toXLS(params paramsListeScores) ([]byte, utils.Jerror) { row.AddCell().Value = "Hors périmètre" } + if score == nil || score.FirstAlert == nil { + panic(score) + } + if *score.FirstAlert { row.AddCell().Value = "oui" } else { diff --git a/pkg/core/summary.go b/pkg/core/summary.go index 41251049..fc51dd74 100644 --- a/pkg/core/summary.go +++ b/pkg/core/summary.go @@ -154,9 +154,9 @@ type summaryParams struct { caMax *int excludeSecteursCovid []string etatAdministratif *string - creationDateThreshold *string firstAlert *bool hasntDelai *bool + creationDateThreshold *string } func (p summaryParams) toSQLParams() []interface{} {