Skip to content

Commit

Permalink
fix: filter null references for detail responses
Browse files Browse the repository at this point in the history
  • Loading branch information
nsenave committed Sep 30, 2024
1 parent 48292c5 commit 670e229
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private void resolveDetailResponses(SimpleMultipleChoiceQuestion simpleMultipleC
.stream()
.filter(ModalityAttachment.CodeAttachment.class::isInstance)
.map(ModalityAttachment.CodeAttachment.class::cast)
.filter(codeAttachment -> codeAttachment.getAttachmentBase() != null)
.collect(Collectors.toMap(
ModalityAttachment.CodeAttachment::getAttachmentBase, codeAttachment -> codeAttachment));
//
Expand Down

0 comments on commit 670e229

Please sign in to comment.