From 16182ffc5a3ea0a6d1d6622d02bd720ede051c2f Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 7 Dec 2021 13:28:08 +0000 Subject: [PATCH] HOTFIX: fix bug where uscChartHash always picked controller charts. --- .../import-types/common/batch-manual/converter.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/lib/score-import/import-types/common/batch-manual/converter.ts b/server/src/lib/score-import/import-types/common/batch-manual/converter.ts index 4c8ea2b1e..8ef73e380 100644 --- a/server/src/lib/score-import/import-types/common/batch-manual/converter.ts +++ b/server/src/lib/score-import/import-types/common/batch-manual/converter.ts @@ -231,7 +231,10 @@ export async function ResolveMatchTypeToKTData( throw new InvalidScoreFailure(`uscChartMash matchType can only be used on USC.`); } - const chart = await db.charts.usc.findOne({ "data.hashSHA1": data.identifier }); + const chart = await db.charts.usc.findOne({ + "data.hashSHA1": data.identifier, + playtype: context.playtype, + }); if (!chart) { throw new KTDataNotFoundFailure(