Fixes bug on DMP finalize when no Datasets where to be Canceled.
This commit is contained in:
parent
46042b7403
commit
f07384ed42
|
@ -437,9 +437,10 @@ public class DataManagementPlanManager {
|
|||
datasetsToBeCanceled.add(dataset.getId());
|
||||
}
|
||||
}
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
if (!datasetsToBeCanceled.isEmpty())
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
} else {
|
||||
List<UUID> datasetsToBeCanceled = new LinkedList<>();
|
||||
for (Dataset dataset : dmp.getDataset()) {
|
||||
|
@ -447,9 +448,10 @@ public class DataManagementPlanManager {
|
|||
datasetsToBeCanceled.add(dataset.getId());
|
||||
}
|
||||
}
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
if (!datasetsToBeCanceled.isEmpty())
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -468,9 +470,10 @@ public class DataManagementPlanManager {
|
|||
datasetsToBeCanceled.add(UUID.fromString(dataset.getId()));
|
||||
}
|
||||
}
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
if (!datasetsToBeCanceled.isEmpty())
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
} else {
|
||||
List<UUID> datasetsToBeCanceled = new LinkedList<>();
|
||||
for (DatasetListingModel dataset : dataManagementPlan.getDatasets()) {
|
||||
|
@ -478,9 +481,10 @@ public class DataManagementPlanManager {
|
|||
datasetsToBeCanceled.add(UUID.fromString(dataset.getId()));
|
||||
}
|
||||
}
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
if (!datasetsToBeCanceled.isEmpty())
|
||||
apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao()
|
||||
.asQueryable().where((builder, root) -> root.get("id").in(datasetsToBeCanceled))
|
||||
.update(root -> root.<Integer>get("status"), Dataset.Status.CANCELED.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue