From 45383afb31808051f743a652c5906cb1810caadf Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 2 Dec 2024 10:11:35 -0600 Subject: [PATCH] Submission/Edit - account for the possibility that a replaced submission file has no hash when the previous one did --- TASVideos/Pages/Submissions/Edit.cshtml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TASVideos/Pages/Submissions/Edit.cshtml.cs b/TASVideos/Pages/Submissions/Edit.cshtml.cs index 1666c9f68..d99b65ae7 100644 --- a/TASVideos/Pages/Submissions/Edit.cshtml.cs +++ b/TASVideos/Pages/Submissions/Edit.cshtml.cs @@ -231,6 +231,11 @@ public async Task OnPost() submission.HashType = parseResult.Hashes.First().Key.ToString(); submission.Hash = parseResult.Hashes.First().Value; } + else + { + submission.HashType = null; + submission.Hash = null; + } } if (SubmissionHelper.JudgeIsClaiming(submission.Status, Submission.Status))