From 2b00374dfee940dac91906bce2e17e7fcc98bb3e Mon Sep 17 00:00:00 2001 From: Daniel Manta Date: Mon, 15 Aug 2022 09:37:30 +0100 Subject: [PATCH] DLSV2-604 When adding new supervisor, TempDataKey should be used for checking existing session --- .../Controllers/LearningPortalController/SelfAssessment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalLearningSolutions.Web/Controllers/LearningPortalController/SelfAssessment.cs b/DigitalLearningSolutions.Web/Controllers/LearningPortalController/SelfAssessment.cs index 94b005f1e6..159f2ab034 100644 --- a/DigitalLearningSolutions.Web/Controllers/LearningPortalController/SelfAssessment.cs +++ b/DigitalLearningSolutions.Web/Controllers/LearningPortalController/SelfAssessment.cs @@ -510,7 +510,7 @@ public IActionResult StartAddNewSupervisor(int selfAssessmentId) [Route("/LearningPortal/SelfAssessment/{selfAssessmentId:int}/Supervisors/Add")] public IActionResult AddNewSupervisor(int selfAssessmentId) { - if(TempData[MultiPageFormDataFeature.AddNewSupervisor] == null) + if(TempData[MultiPageFormDataFeature.AddNewSupervisor.TempDataKey] == null) { return RedirectToAction("StatusCode", "LearningSolutions", new { code = (int)HttpStatusCode.Forbidden }); }