From ce169f2ad5d4eb69657b189442bb05fde4537002 Mon Sep 17 00:00:00 2001 From: antoineludeau <52679050+antoineludeau@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:30:51 +0200 Subject: [PATCH] Modified key name for number of district with ban id --- lib/models/ban.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/models/ban.cjs b/lib/models/ban.cjs index cf656a0d..eb8f0a15 100644 --- a/lib/models/ban.cjs +++ b/lib/models/ban.cjs @@ -71,14 +71,14 @@ async function getStatsOfAddresses(cog) { $group: { _id: null, nbNumeroWithBanId: {$sum: 1}, - distinctCodeCommune: {$addToSet: '$codeCommune'} + nbCommuneWithBanId: {$addToSet: '$codeCommune'} } }, { $project: { _id: 0, nbNumeroWithBanId: '$nbNumeroWithBanId', - countDistinctCodeCommune: {$size: '$distinctCodeCommune'} + nbCommuneWithBanId: {$size: '$nbCommuneWithBanId'} } }, ]