Skip to content

Commit 7fb290a

Browse files
authored
Merge pull request #379 from topcoder-platform/debug-provitional-score
fix: provisional score
2 parents 92ec7b3 + 6fa669d commit 7fb290a

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

config/production.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05",
3+
"AV_SCAN_TYPE_IDS": ["1297f2db-687d-4ac8-bf9c-78b6df1b1281", "2929bc33-8f58-4011-8e49-9e3a10499e97", "55bbb17d-aac2-45a6-89c3-a8d102863d05"],
34
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48"
45
}

dist/dev/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/prod/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/submission.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* eslint-disable no-param-reassign */
66
import _ from 'lodash';
77

8-
const { AV_SCAN_SCORER_REVIEW_TYPE_ID, PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID } = CONFIG;
8+
const { AV_SCAN_TYPE_IDS, PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID } = CONFIG;
99

1010
function removeDecimal(num) {
1111
const re = new RegExp('^-?\\d+');
@@ -121,7 +121,10 @@ export function processMMSubmissions(submissions) {
121121
if (!data[memberId]) {
122122
data[memberId] = [];
123123
}
124-
const validReviews = _.reject(submission.review, ['typeId', AV_SCAN_SCORER_REVIEW_TYPE_ID]);
124+
const validReviews = _.reject(
125+
submission.review,
126+
review => AV_SCAN_TYPE_IDS.includes(review.typeId),
127+
);
125128
validReviews.sort((a, b) => {
126129
const dateA = new Date(a.created);
127130
const dateB = new Date(b.created);

0 commit comments

Comments
 (0)