Skip to content

Commit 5278ec9

Browse files
authored
SAK-50810 Assignment in peer review attachmentRefList maybe null (#13149)
1 parent f57c065 commit 5278ec9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assignment/tool/src/java/org/sakaiproject/assignment/entityproviders/AssignmentEntityProvider.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,9 @@ public SimplePeerAssessmentItem(PeerAssessmentItem item) {
22472247
this.scaledFactor = item.getScaledFactor();
22482248
this.draft = item.isDraft();
22492249

2250-
this.attachmentUrlList = item.getAttachmentRefList().stream()
2250+
this.attachmentUrlList = Optional.ofNullable(item.getAttachmentRefList())
2251+
.orElseGet(Collections::emptyList)
2252+
.stream()
22512253
.map(Reference::getUrl)
22522254
.collect(Collectors.toList());
22532255
}

0 commit comments

Comments
 (0)