Skip to content

Commit

Permalink
Merge pull request DSpace#9136 from tdonohue/minor_null_fix
Browse files Browse the repository at this point in the history
Verify optional request-a-copy message is not missing or a literal "null" value
  • Loading branch information
tdonohue authored Nov 2, 2023
2 parents 33cc216 + 534ee3a commit bb72aeb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ public RequestItemRest put(Context context, HttpServletRequest request,
}

JsonNode responseMessageNode = requestBody.findValue("responseMessage");
String message = responseMessageNode.asText();
String message = null;
if (responseMessageNode != null && !responseMessageNode.isNull()) {
message = responseMessageNode.asText();
}

ri.setDecision_date(new Date());
requestItemService.update(context, ri);
Expand Down

0 comments on commit bb72aeb

Please sign in to comment.