Skip to content

Commit

Permalink
server: avoid npe for empty body in post calls, #TASK-4073
Browse files Browse the repository at this point in the history
  • Loading branch information
pfurio committed Sep 19, 2024
1 parent 0e5515c commit 9002818
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,12 @@ protected DataResult<Job> submitJobRaw(String toolId, String project, String stu
String jobDescription, String jobDependsOnStr, String jobTagsStr, String jobScheduledStartTime,
String jobPriority, Boolean dryRun)
throws CatalogException {
Map<String, Object> paramsMap = bodyParams.toParams();
Map<String, Object> paramsMap;
if (bodyParams != null) {
paramsMap = bodyParams.toParams();
} else {
paramsMap = new HashMap<>();
}
if (StringUtils.isNotEmpty(study)) {
paramsMap.putIfAbsent(ParamConstants.STUDY_PARAM, study);
}
Expand Down

0 comments on commit 9002818

Please sign in to comment.