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 project = new Project();
|
||||||
project.setAbbreviation("");
|
project.setAbbreviation("");
|
||||||
project.setLabel(this.project.getLabel());
|
project.setLabel(this.project.getLabel());
|
||||||
|
project.setType(Project.ProjectType.INTERNAL.getValue());
|
||||||
project.setReference("dmp:" + this.project.getLabel());
|
project.setReference("dmp:" + this.project.getLabel());
|
||||||
project.setUri("");
|
project.setUri("");
|
||||||
project.setDefinition("");
|
project.setDefinition("");
|
||||||
project.setType(Project.ProjectType.INTERNAL.getValue());
|
|
||||||
project.setDescription(this.project.getDescription());
|
|
||||||
project.setStatus(Project.Status.ACTIVE.getValue());
|
|
||||||
project.setCreated(new Date());
|
project.setCreated(new Date());
|
||||||
|
project.setStatus(Project.Status.ACTIVE.getValue());
|
||||||
UserInfo userInfo = new UserInfo();
|
project.setModified(new Date());
|
||||||
userInfo.setId(this.users.stream().filter(userInfoListingModel -> ((Integer) userInfoListingModel.getRole()).equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getId());
|
project.setDescription(this.project.getDescription());
|
||||||
project.setCreationUser(userInfo);
|
|
||||||
|
|
||||||
dataManagementPlanEntity.setProject(project);
|
dataManagementPlanEntity.setProject(project);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue