Skip to content

Commit 96dc4c4

Browse files
fixed bug - Service unavailable upon clicking back to HeatNettworkType page (#270)
1 parent cd0c208 commit 96dc4c4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

HNTAS/HNTAS.Web.UI/Controllers/HeatNetworkController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,11 @@ public async Task<IActionResult> NetworkDetails()
604604
[HttpGet]
605605
public async Task<IActionResult> SelectNetworkDetail([FromQuery] string hnid, [FromQuery] NetworkDetailsType networkDetailId)
606606
{
607+
_sessionHelper.SaveToSession<string>(HttpContext, SessionKeys.HnId, hnid.ToUpper());
607608
switch (networkDetailId)
608609
{
609610
case NetworkDetailsType.NetworkCharacteristics:
610-
return RedirectToAction("HeatNetworkType", "NetworkCharacteristics", new { hnid });
611+
return RedirectToAction("HeatNetworkType", "NetworkCharacteristics");
611612
case NetworkDetailsType.NetworkElements:
612613
return RedirectToAction("SelectNetworkElements", "NetworkElements", new { hnid });
613614
default:

HNTAS/HNTAS.Web.UI/Controllers/NetworkCharacteristicsController.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ public NetworkCharacteristicsController(ISessionHelper sessionHelper, IHeatNetwo
2020
}
2121

2222
[HttpGet]
23-
public IActionResult HeatNetworkType(string hnid)
23+
public IActionResult HeatNetworkType()
2424
{
2525
this.ShowBackButton("NetworkDetails", "HeatNetwork");
26-
27-
_sessionHelper.SaveToSession<string>(HttpContext, SessionKeys.HnId, hnid.ToUpper());
28-
TempData["HnId"] = hnid.ToUpper();
26+
var hnId = _sessionHelper.GetFromSession<string>(HttpContext, SessionKeys.HnId);
27+
TempData["HnId"] = hnId;
2928
var model = _sessionHelper.GetFromSession<HeatNetworkTypeViewModel>(HttpContext, SessionKeys.HeatNetworkTypeViewModelSessionKey) ?? new HeatNetworkTypeViewModel { HeatNetworkTypes = Helpers.Utility.GetHeatNetworkTypeOptions() };
3029
return View(model);
3130
}

0 commit comments

Comments
 (0)