Fixes bug on creating a new DMP on Project tab.
This commit is contained in:
parent
173ff16602
commit
f0de34bcd3
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue