Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #748 from DFE-Digital/hotfix/decision-by-id
Browse files Browse the repository at this point in the history
Update decision to get by Id
  • Loading branch information
dneed-nimble authored Jun 4, 2024
2 parents 1a23963 + 750a76e commit 4afaded
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ public RecordDecision(
PropagateBackLinkOverride = false;
}

[BindProperty]
[Required(ErrorMessage = "Select a decision")]
public AdvisoryBoardDecisions? AdvisoryBoardDecision { get; set; }
[BindProperty]
[Required(ErrorMessage = "Select a decision")]
public AdvisoryBoardDecisions? AdvisoryBoardDecision { get; set; }

public async Task<IActionResult> OnGet(int urn)
{
public async Task<IActionResult> OnGet(int urn)
{
AdvisoryBoardDecision sessionDecision = GetDecisionFromSession(urn);

if (sessionDecision.Decision == null)
{
RepositoryResult<AdvisoryBoardDecision> savedDecision = await _decisionRepository.Get(urn);
RepositoryResult<AdvisoryBoardDecision> savedDecision = await _decisionRepository.Get(Id);
SetDecisionInSession(urn, savedDecision?.Result);
AdvisoryBoardDecision = savedDecision?.Result?.Decision;
}
Expand Down

0 comments on commit 4afaded

Please sign in to comment.