Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public async Task<QuestionResponse> GetResponseAsync()
_subCatAnswersByHeadingId = SubCatAnswers
.Where(x => x.HeadingId > 0)
.GroupBy(x => x.HeadingId)
.ToDictionary(g => g.Key, g => g.First());
.ToDictionary(g => g.Key, g => g.FirstOrDefault());
}

AddResponse(resp, list2, "Component Defaults");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,19 @@ public IActionResult GetList([FromQuery] string group)
[Route("api/ComponentQuestionList")]
public async Task<IActionResult> GetComponentQuestionsList()
{
var manager = new ComponentQuestionBusiness(_context, _assessmentUtil, _token, _questionRequirement);
QuestionResponse resp = await manager.GetResponseAsync();
try
{
var manager = new ComponentQuestionBusiness(_context, _assessmentUtil, _token, _questionRequirement);
QuestionResponse resp = await manager.GetResponseAsync();

return Ok(resp);
}
catch (Exception exc)
{
LogManager.GetCurrentClassLogger().Error(exc);
return BadRequest(exc.Message);
}

return Ok(resp);
}


Expand Down