Fixes bug on Public DMP editing exposing not "Finalized" Datasets.
This commit is contained in:
parent
1e5b01a875
commit
3d7e31e145
|
@ -135,7 +135,7 @@ public class DataManagementPlanManager {
|
|||
.selectAsync(item -> {
|
||||
item.setDataset(
|
||||
item.getDataset().stream()
|
||||
.filter(dataset -> dataset.isPublic()).collect(Collectors.toSet()));
|
||||
.filter(dataset -> dataset.getStatus().equals(Dataset.Status.FINALISED.getValue())).collect(Collectors.toSet()));
|
||||
return new DataManagementPlanListingModel().fromDataModelDatasets(item);
|
||||
})
|
||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||
|
@ -326,6 +326,7 @@ public class DataManagementPlanManager {
|
|||
if (dataManagementPlanEntity != null && dataManagementPlanEntity.getStatus() == 1){
|
||||
eu.eudat.models.data.dmp.DataManagementPlan datamanagementPlan = new eu.eudat.models.data.dmp.DataManagementPlan();
|
||||
datamanagementPlan.fromDataModel(dataManagementPlanEntity);
|
||||
datamanagementPlan.setDatasets(datamanagementPlan.getDatasets().stream().filter(dataset -> dataset.getStatus() == Dataset.Status.FINALISED.getValue()).collect(Collectors.toList()));
|
||||
Map dmpProperties = dataManagementPlanEntity.getDmpProperties() != null ? new org.json.JSONObject(dataManagementPlanEntity.getDmpProperties()).toMap() : null;
|
||||
datamanagementPlan.setDynamicFields(dynamicProjectConfiguration.getFields().stream().map(item -> {
|
||||
DynamicFieldWithValue fieldWithValue = new DynamicFieldWithValue();
|
||||
|
|
Loading…
Reference in New Issue