Fixes bug on DMP editor model exposing deleted Datasets.
This commit is contained in:
parent
e39e0df143
commit
4d9ae93cf2
|
@ -220,21 +220,8 @@ public class DataManagementPlan implements DataModel<DMP, DataManagementPlan> {
|
||||||
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
|
AssociatedProfile associatedProfile = new AssociatedProfile().fromData(datasetProfile);
|
||||||
this.profiles.add(associatedProfile);
|
this.profiles.add(associatedProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps());
|
|
||||||
Element item = (Element) viewStyleDoc.getElementsByTagName("profiles").item(0);
|
|
||||||
this.profiles = new LinkedList<>();
|
|
||||||
if (item != null) {
|
|
||||||
NodeList associatedProfilesElement = item.getChildNodes();
|
|
||||||
for (int temp = 0; temp < associatedProfilesElement.getLength(); temp++) {
|
|
||||||
Node associatedProfileElement = associatedProfilesElement.item(temp);
|
|
||||||
if (associatedProfileElement.getNodeType() == Node.ELEMENT_NODE) {
|
|
||||||
this.profiles.add(new AssociatedProfile().fromXml((Element) associatedProfileElement));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
this.datasets = entity.getDataset().stream().map(item -> new DatasetListingModel().fromDataModel(item)).collect(Collectors.toList());
|
this.datasets = entity.getDataset().stream().filter(dataset -> !dataset.getStatus().equals(Dataset.Status.DELETED.getValue())).map(x-> new DatasetListingModel().fromDataModel(x)).collect(Collectors.toList());
|
||||||
this.modified = entity.getModified();
|
this.modified = entity.getModified();
|
||||||
this.created = entity.getCreated();
|
this.created = entity.getCreated();
|
||||||
this.description = entity.getDescription();
|
this.description = entity.getDescription();
|
||||||
|
|
Loading…
Reference in New Issue