Skip to content

Commit

Permalink
Fix NPE on CohortReportFormController.onSubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Jan 2, 2024
1 parent 5d36876 commit 6ba8804
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse
Document xml = db.parse(new InputSource(new StringReader(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" + data)));
Node node = findChild(xml, "reportSchema");

if(node == null) {
return null;
}

node = findChild(node, "dataSets");
Element dsd = xml.createElement("dataSetDefinition");
dsd.setAttribute("name", "cohorts");
Expand Down

0 comments on commit 6ba8804

Please sign in to comment.