Fixes bug on not properly saving the Creator of a DMP.

This commit is contained in:
gkolokythas 2019-05-31 16:43:14 +03:00
parent 2db15fc713
commit 2e467f8277
1 changed files with 2 additions and 0 deletions

View File

@ -481,6 +481,7 @@ public class DataManagementPlanManager {
userDMP.setDmp(newDmp);
userDMP.setUser(user);
userDMP.setRole((UserDMP.UserDMPRoles.OWNER.getValue()));
apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().createOrUpdate(userDMP);
copyDatasets(newDmp, apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao());
} else {
@ -505,6 +506,7 @@ public class DataManagementPlanManager {
userDMP.setDmp(newDmp);
userDMP.setUser(user);
userDMP.setRole((UserDMP.UserDMPRoles.OWNER.getValue()));
apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().createOrUpdate(userDMP);
copyDatasets(newDmp, apiContext.getOperationsContext().getDatabaseRepository().getDatasetDao());
}