fixed flatMap bug
This commit is contained in:
parent
983fb7d8ea
commit
270d7a2282
1 changed files with 1 additions and 3 deletions
|
@ -312,9 +312,7 @@ public class ExamConfigUpdateServiceImpl implements ExamConfigUpdateService {
|
||||||
|
|
||||||
private Collection<Result<Exam>> lockForUpdate(final Collection<Long> examIds, final String update) {
|
private Collection<Result<Exam>> lockForUpdate(final Collection<Long> examIds, final String update) {
|
||||||
return examIds.stream()
|
return examIds.stream()
|
||||||
.map(id -> this.examDAO.byPK(id)
|
.map(id -> this.examDAO.byPK(id).flatMap(exam -> this.examDAO.placeLock(exam, update)))
|
||||||
.map(exam -> this.examDAO.placeLock(exam, update))
|
|
||||||
.getOrThrow())
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue