From 109494505b51b8cf818f8a68fd716643f7c43a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20L=27H=C3=B4te?= Date: Mon, 16 Dec 2024 18:38:06 +0100 Subject: [PATCH] fix(structures): Current name can to be in the future /2 --- src/api/commons/queries/current-name.query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/commons/queries/current-name.query.js b/src/api/commons/queries/current-name.query.js index 6a8ff0e1..c5f18a90 100644 --- a/src/api/commons/queries/current-name.query.js +++ b/src/api/commons/queries/current-name.query.js @@ -7,8 +7,8 @@ export default [ as: 'name', cond: { $and: [ - { $lte: ['$$name.startDate', '$NOW'] }, - { $gte: ['$$name.endDate', '$NOW'] }, + { $lte: ['$$name.startDate', new Date().toISOString().split('T')[0]] }, + { $gte: ['$$name.endDate', new Date().toISOString().split('T')[0]] }, ], }, },