Skip to content

Commit 2ec541f

Browse files
authored
Merge pull request #2778 from TechnologyEnhancedLearning/Develop/Fixes/TD-4539-Issueshowingconsole'500'erroronthescreenwhenclickedbrowserbackbuttonafterprocessingtheBulkUploadregistration
TD-4539 Issue showing console '500' error on the screen when clicked browser back button after processing the Bulk Upload registration
2 parents 0f0400f + 65025b0 commit 2ec541f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates/BulkUploadController.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ public IActionResult UploadComplete()
147147
[Route("WelcomeEmail")]
148148
public IActionResult WelcomeEmail()
149149
{
150+
if (!TempData.Any())
151+
{
152+
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 });
153+
}
150154
var data = GetBulkUploadData();
151155
var model = new WelcomeEmailViewModel() { Day = data.Day, Month = data.Month, Year = data.Year, DelegatesToRegister = data.ToRegisterActiveCount + data.ToRegisterInactiveCount };
152156
return View(model);
@@ -265,6 +269,10 @@ public IActionResult SubmitAddWhoToGroup(AddWhoToGroupViewModel model)
265269
[Route("UploadSummary")]
266270
public IActionResult UploadSummary()
267271
{
272+
if (!TempData.Any())
273+
{
274+
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 });
275+
}
268276
var data = GetBulkUploadData();
269277
var centreId = User.GetCentreIdKnownNotNull();
270278
string? groupName;
@@ -295,6 +303,10 @@ public IActionResult UploadSummary()
295303
[HttpPost]
296304
public IActionResult StartProcessing()
297305
{
306+
if (!TempData.Any())
307+
{
308+
return RedirectToAction("StatusCode", "LearningSolutions", new { code = 410 });
309+
}
298310
var centreId = User.GetCentreIdKnownNotNull();
299311
var data = GetBulkUploadData();
300312
var adminId = User.GetAdminIdKnownNotNull();

0 commit comments

Comments
 (0)