Skip to content

Commit

Permalink
Ajoute DateTime.fromSQL en plus de DateTime.fromISO pour la comparais…
Browse files Browse the repository at this point in the history
…on des années d'audit pour faire fonctionner en local
  • Loading branch information
amandinejacquelin committed Jan 29, 2025
1 parent 3507a0f commit 5d5d211
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,8 @@ export default class ReferentielsScoringService {
audit = audits.find(
(a) =>
a.dateFin &&
DateTime.fromISO(a.dateFin).year === parameters.anneeAudit
(DateTime.fromISO(a.dateFin).year === parameters.anneeAudit ||
DateTime.fromSQL(a.dateFin).year === parameters.anneeAudit)
);
if (!audit) {
throw new HttpException(
Expand Down

0 comments on commit 5d5d211

Please sign in to comment.