From df757121c67d3262c3d23f0c3c4be53fd6299386 Mon Sep 17 00:00:00 2001 From: Bastien Seree Date: Fri, 13 Sep 2024 11:11:15 +0200 Subject: [PATCH] Cyberleague: [#116] Fix one field test in related_users computing --- backend/web/server/plugins/cyberleague/related.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/web/server/plugins/cyberleague/related.js b/backend/web/server/plugins/cyberleague/related.js index 197bc628a8..ca4ead56a4 100644 --- a/backend/web/server/plugins/cyberleague/related.js +++ b/backend/web/server/plugins/cyberleague/related.js @@ -23,7 +23,7 @@ const getRelated = (model) => { let res = [] const sameUserFunction = lodash.groupBy(users, (u) => u.function)[data.function] - const sameFunLength = sameUserFunction.length + const sameFunLength = sameUserFunction.length || 0 //if not enough related with same function, need to add users with same company size if (sameFunLength <10) {