Skip to content

Commit

Permalink
Handle null dates, to prevent NPE (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
cram-cfa authored Jan 21, 2025
1 parent 411cf6c commit ef64f95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public Map<String, SubmissionField> prepareSubmissionFields(Submission submissio
}

private String formatDateWithNoTime(OffsetDateTime offsetDateTime) {
return dateTimeFormatter.format(offsetDateTime);
return offsetDateTime != null ? dateTimeFormatter.format(offsetDateTime) : "";
}
}

0 comments on commit ef64f95

Please sign in to comment.