Keep tags consistent
This commit is contained in:
parent
aca78cac8e
commit
f48e4b5275
|
@ -731,7 +731,9 @@ public class DataManagementPlanManager {
|
|||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().getWithCriteria(criteria1).toList().forEach(dmp -> {
|
||||
for (Dataset dataset: dmp.getDataset()) {
|
||||
try {
|
||||
datasetManager.updateTags(apiContext.getOperationsContext().getDatasetRepository(), new DatasetWizardModel().fromDataModel(dataset));
|
||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
||||
datasetWizardModel.setTags(apiContext.getOperationsContext().getDatasetRepository().findDocument(dataset.getId().toString()).getTags());
|
||||
this.datasetManager.updateTags(apiContext.getOperationsContext().getDatasetRepository(), datasetWizardModel);
|
||||
} catch (IOException e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
@ -1339,7 +1341,9 @@ public class DataManagementPlanManager {
|
|||
apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().getWithCriteria(criteria).toList().stream().forEach(dmp1 -> {
|
||||
dmp1.getDataset().forEach(dataset -> {
|
||||
try {
|
||||
datasetManager.updateTags(apiContext.getOperationsContext().getDatasetRepository(), new DatasetWizardModel().fromDataModel(dataset));
|
||||
DatasetWizardModel datasetWizardModel = new DatasetWizardModel().fromDataModel(dataset);
|
||||
datasetWizardModel.setTags(apiContext.getOperationsContext().getDatasetRepository().findDocument(dataset.getId().toString()).getTags());
|
||||
this.datasetManager.updateTags(apiContext.getOperationsContext().getDatasetRepository(), datasetWizardModel);
|
||||
} catch (IOException e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue