Removed Bad Hack

This commit is contained in:
George Kalampokis 2020-03-30 15:34:56 +03:00
parent 1b0b84a7d2
commit dca8fa83a0
1 changed files with 0 additions and 7 deletions

View File

@ -131,13 +131,6 @@ public class DataManagementPlanManager {
if (fieldsGroup.equals("listing")) { if (fieldsGroup.equals("listing")) {
itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class)) itemsFuture = pagedItems.withHint(HintedModelFactory.getHint(DataManagementPlanListingModel.class))
.selectAsync(item -> { .selectAsync(item -> {
if (item.getUsers().stream().noneMatch(userDMP -> userDMP.getRole().equals(UserDMP.UserDMPRoles.OWNER.getValue()))) {
for (UserDMP userDMP: item.getUsers()) {
userDMP.setRole(UserDMP.UserDMPRoles.OWNER.getValue());
databaseRepository.getUserDmpDao().createOrUpdate(userDMP);
break;
}
}
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()