From d70947030a1481004787b15776099345a16e6866 Mon Sep 17 00:00:00 2001 From: Sherif Olaboye Date: Wed, 23 Apr 2025 11:00:56 +0100 Subject: [PATCH] TD-5487 Issue showing multiple comments when clicked the back link after submitted the review on Frameworks section --- .../Controllers/FrameworksController/Review.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Review.cs b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Review.cs index 16c2665150..6ba6f43927 100644 --- a/DigitalLearningSolutions.Web/Controllers/FrameworksController/Review.cs +++ b/DigitalLearningSolutions.Web/Controllers/FrameworksController/Review.cs @@ -81,6 +81,8 @@ public IActionResult LoadReview(int frameworkId, int reviewId) public IActionResult SubmitFrameworkReview(int frameworkId, int reviewId, string? comment, bool signedOff) { var adminId = GetAdminId(); + var framework = frameworkService.GetBaseFrameworkByFrameworkId(frameworkId, adminId); + if (framework.FrameworkReviewID == 0 || framework.FrameworkReviewID == null) return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 }); int? commentId = null; if (!string.IsNullOrWhiteSpace(comment)) commentId = frameworkService.InsertComment(frameworkId, adminId, comment, null); frameworkService.SubmitFrameworkReview(frameworkId, reviewId, signedOff, commentId);