Skip to content

Commit

Permalink
Simplify code which creates a new assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHowellDfE committed Feb 8, 2024
1 parent 399d8eb commit 63ffd17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal class AssessmentType

public static Database.Entities.AssessmentType? FromDomain(Domain.Model.AssessmentType? domainModel)
{
if(domainModel == null)
if (domainModel == null)
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class Phase

public static Database.Entities.Phase? FromDomain(Domain.Model.Phase? domainModel)
{
if(domainModel == null)
if (domainModel == null)
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public StartNewPageModel(AssessmentRequestRepository assessmentRequestRepository
public async Task<IActionResult> OnPost()
{
_logger.LogInformation("Attempting to create a new assessment request");

var assessmentRequest = await _assessmentRequestRepository.CreateAsync();
if(assessmentRequest is null)
if (assessmentRequest is null)
{
_logger.LogError("Failed to create a new assessment request");
return RedirectToPage("/Error");
}

_logger.LogInformation("Created new assessment request with ID {Id}", assessmentRequest.Id);

return RedirectToPage("/Book/Request/Question/PhaseConcluding", new { assessmentRequest.Id });
Expand Down

0 comments on commit 63ffd17

Please sign in to comment.