Prevent to check deleted Datasets when checking which Dataset Templates are in use
This commit is contained in:
parent
a3d662aed1
commit
1e0b828a48
|
@ -366,7 +366,7 @@ public class DataManagementPlanManager {
|
|||
if (dbTime.toEpochMilli() != modelTime.toEpochMilli()) {
|
||||
throw new Exception("Another user have already edit that DMP.");
|
||||
}
|
||||
List<Dataset> datasetList = new ArrayList<>(dmp1.getDataset());
|
||||
List<Dataset> datasetList = dmp1.getDataset().stream().filter(dataset -> dataset.getStatus() != 99).collect(Collectors.toList());
|
||||
for (Dataset dataset : datasetList) {
|
||||
if (dataManagementPlan.getProfiles().stream().filter(associatedProfile -> dataset.getProfile().getId().equals(associatedProfile.getId())).findAny().orElse(null) == null)
|
||||
throw new Exception("Dataset Template for Dataset Description is missing from the DMP.");
|
||||
|
|
Loading…
Reference in New Issue