diff --git a/DigitalLearningSolutions.Web/ServiceFilter/RedirectToErrorEmptySessionData.cs b/DigitalLearningSolutions.Web/ServiceFilter/RedirectToErrorEmptySessionData.cs index dd275f9117..c1e71c282c 100644 --- a/DigitalLearningSolutions.Web/ServiceFilter/RedirectToErrorEmptySessionData.cs +++ b/DigitalLearningSolutions.Web/ServiceFilter/RedirectToErrorEmptySessionData.cs @@ -34,6 +34,11 @@ public void OnActionExecuting(ActionExecutingContext context) return; } + if (context.ActionArguments.ContainsKey("actionname") && context.ActionArguments["actionname"].ToString() == "Edit") + { + return; + } + if (_feature.TempDataKey != string.Empty && (controller.TempData == null || controller.TempData.Peek(_feature.TempDataKey) == null)) { context.Result = new StatusCodeResult((int)HttpStatusCode.Gone);