Skip to content

Commit

Permalink
fix prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Josquin Cornec committed Jun 3, 2024
1 parent a18c4e1 commit 36c41fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pkg/core/score.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{} {
Expand Down

0 comments on commit 36c41fc

Please sign in to comment.