Skip to content

Commit

Permalink
Fix duplicate behavior with submitting full video labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Jan 31, 2024
1 parent e041b9c commit 121cc7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/routes/postSkipSegments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand Down

0 comments on commit 121cc7f

Please sign in to comment.