Fixes bug on Dataset createOrUpdate not saving associated DMP properly.

This commit is contained in:
gkolokythas 2019-06-04 17:05:47 +03:00
parent 9911dcdac5
commit 4532313623
1 changed files with 1 additions and 0 deletions

View File

@ -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);