From 262ea8c7e7a3a4b55bd1fd907e1fa660ef393e1d Mon Sep 17 00:00:00 2001 From: zkldi Date: Mon, 3 May 2021 00:23:15 +0100 Subject: [PATCH] add isPrimary to score docs --- server/src/score-import/framework/user-game-stats/rating.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/score-import/framework/user-game-stats/rating.ts b/server/src/score-import/framework/user-game-stats/rating.ts index 6a09cc2b4..5dfb7eb1b 100644 --- a/server/src/score-import/framework/user-game-stats/rating.ts +++ b/server/src/score-import/framework/user-game-stats/rating.ts @@ -15,6 +15,7 @@ export async function CalculateRatings( game, playtype, userID, + isPrimary: true, }, { sort: { @@ -28,6 +29,7 @@ export async function CalculateRatings( game, playtype, userID, + isPrimary: true, }, { sort: { @@ -52,6 +54,7 @@ function LazySumAll(key: CustomCalcNames) { game: game, playtype: playtype, userID: userID, + isPrimary: true, [`calculatedData.gameSpecific.${key}`]: { $gt: 0 }, }); @@ -68,6 +71,7 @@ function LazyCalcN(key: CustomCalcNames, n: integer, returnMean?: boolean) { game: game, playtype: playtype, userID: userID, + isPrimary: true, [`calculatedData.gameSpecific.${key}`]: { $gt: 0 }, }, {