Skip to content

Commit

Permalink
reset the submission judge if the submission is set to new, no matter…
Browse files Browse the repository at this point in the history
… what it was previously (#2040)
  • Loading branch information
Masterjun3 authored Nov 18, 2024
1 parent 93e81f9 commit 307eeea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions TASVideos.Data/Helpers/SubmissionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public static bool JudgeIsClaiming(SubmissionStatus oldS, SubmissionStatus newS)
return oldS != SubmissionStatus.JudgingUnderWay && newS == SubmissionStatus.JudgingUnderWay;
}

public static bool JudgeIsUnclaiming(SubmissionStatus oldS, SubmissionStatus newS)
public static bool JudgeIsUnclaiming(SubmissionStatus newS)
{
return oldS == SubmissionStatus.JudgingUnderWay && newS == SubmissionStatus.New;
return newS == SubmissionStatus.New;
}

public static bool PublisherIsClaiming(SubmissionStatus oldS, SubmissionStatus newS)
Expand Down
2 changes: 1 addition & 1 deletion TASVideos/Pages/Submissions/Edit.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public async Task<IActionResult> OnPost()
{
submission.Judge = await db.Users.SingleAsync(u => u.UserName == userName);
}
else if (SubmissionHelper.JudgeIsUnclaiming(submission.Status, Submission.Status))
else if (SubmissionHelper.JudgeIsUnclaiming(Submission.Status))
{
submission.Judge = null;
}
Expand Down

0 comments on commit 307eeea

Please sign in to comment.