From 4532313623ca21f73282d8f1af974415d3e0f28e Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Tue, 4 Jun 2019 17:05:47 +0300 Subject: [PATCH] Fixes bug on Dataset createOrUpdate not saving associated DMP properly. --- .../src/main/java/eu/eudat/logic/managers/DatasetManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java index 78690fab2..ddd04ebfc 100644 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java +++ b/dmp-backend/web/src/main/java/eu/eudat/logic/managers/DatasetManager.java @@ -322,6 +322,7 @@ public class DatasetManager { public eu.eudat.data.entities.Dataset createOrUpdate(DatasetWizardModel datasetWizardModel, Principal principal) throws Exception { eu.eudat.data.entities.Dataset dataset = datasetWizardModel.toDataModel(); + dataset.setDmp(apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().find(datasetWizardModel.getDmp().getId())); propertiesModelToString(datasetWizardModel, dataset); UserInfo userInfo = apiContext.getOperationsContext().getBuilderFactory().getBuilder(UserInfoBuilder.class).id(principal.getId()).build(); dataset.setCreator(userInfo);