Removed unnecessary condition when retrieving DMPs
This commit is contained in:
parent
744acd7abf
commit
ef40c5568f
|
@ -161,8 +161,7 @@ public class DataManagementPlanManager {
|
||||||
item.setDataset(
|
item.setDataset(
|
||||||
item.getDataset().stream()
|
item.getDataset().stream()
|
||||||
.filter(dataset -> !dataset.getStatus().equals(Dataset.Status.DELETED.getValue()) && !dataset.getStatus().equals(Dataset.Status.CANCELED.getValue())).collect(Collectors.toList()).stream()
|
.filter(dataset -> !dataset.getStatus().equals(Dataset.Status.DELETED.getValue()) && !dataset.getStatus().equals(Dataset.Status.CANCELED.getValue())).collect(Collectors.toList()).stream()
|
||||||
.filter(dataset -> dataset.getDmp().getUsers().stream().filter(userDMP -> userDMP.getRole().equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getUser().getId().equals(principalID)
|
.filter(dataset -> dataset.getDmp().getUsers().stream()
|
||||||
|| dataset.getDmp().getUsers().stream()
|
|
||||||
.filter(x -> x.getUser().getId().equals(principalID))
|
.filter(x -> x.getUser().getId().equals(principalID))
|
||||||
.collect(Collectors.toList()).size() > 0)
|
.collect(Collectors.toList()).size() > 0)
|
||||||
.collect(Collectors.toSet()));
|
.collect(Collectors.toSet()));
|
||||||
|
|
Loading…
Reference in New Issue