From 121cc7f48111a45898c260210df4aa47ac6152da Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 31 Jan 2024 13:05:47 -0500 Subject: [PATCH] Fix duplicate behavior with submitting full video labels --- src/routes/postSkipSegments.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index 6135f07c..616e28d1 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -329,13 +329,12 @@ async function checkEachSegmentValid(rawIP: IPAddress, paramUserID: UserID, user if (segments[i].actionType === ActionType.Full) { // Forward as vote await vote(rawIP, duplicateCheck2Row.UUID, paramUserID, 1); - segments[i].ignoreSegment = true; continue; } } } - if (segments.every((s) => s.ignoreSegment)) { + if (segments.every((s) => s.ignoreSegment && s.actionType !== ActionType.Full)) { return { pass: false, errorMessage: "Segment has already been submitted before.", errorCode: 409 }; }