Fixes bug on creating a new DMP on Project tab.

This commit is contained in:
gkolokythas 2019-06-13 12:17:40 +03:00
parent 173ff16602
commit f0de34bcd3
1 changed files with 4 additions and 7 deletions

View File

@ -249,17 +249,14 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
Project project = new Project();
project.setAbbreviation("");
project.setLabel(this.project.getLabel());
project.setType(Project.ProjectType.INTERNAL.getValue());
project.setReference("dmp:" + this.project.getLabel());
project.setUri("");
project.setDefinition("");
project.setType(Project.ProjectType.INTERNAL.getValue());
project.setDescription(this.project.getDescription());
project.setStatus(Project.Status.ACTIVE.getValue());
project.setCreated(new Date());
UserInfo userInfo = new UserInfo();
userInfo.setId(this.users.stream().filter(userInfoListingModel -> ((Integer) userInfoListingModel.getRole()).equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getId());
project.setCreationUser(userInfo);
project.setStatus(Project.Status.ACTIVE.getValue());
project.setModified(new Date());
project.setDescription(this.project.getDescription());
dataManagementPlanEntity.setProject(project);
}