Fixed issue when impoting DMP with Organizations and/or researchers
This commit is contained in:
parent
b5877f997c
commit
2dc5037afe
|
@ -635,7 +635,6 @@ public class DataManagementPlanManager {
|
|||
|
||||
}
|
||||
|
||||
|
||||
private void assignUser(DMP dmp, UserInfo userInfo) {
|
||||
UserDMP userDMP = new UserDMP();
|
||||
userDMP.setDmp(dmp);
|
||||
|
@ -1251,14 +1250,16 @@ public class DataManagementPlanManager {
|
|||
for (OrganisationImportModel org : dataManagementPlans.get(0).getOrganisationImportModels()) {
|
||||
eu.eudat.models.data.dmp.Organisation organisation = new eu.eudat.models.data.dmp.Organisation();
|
||||
organisation.setLabel(org.getOrganaisationNameImport());
|
||||
organisation.setId(org.getOrganaisationReferenceImport());
|
||||
organisation.setReference(org.getOrganaisationReferenceImport());
|
||||
organisation.setKey(organisation.getReference().split(":")[0]);
|
||||
organisations.add(organisation);
|
||||
}
|
||||
List<eu.eudat.models.data.dmp.Researcher> researchers = new LinkedList<>();
|
||||
for (ResearcherImportModels res : dataManagementPlans.get(0).getResearchersImportModels()) {
|
||||
eu.eudat.models.data.dmp.Researcher researcher = new eu.eudat.models.data.dmp.Researcher();
|
||||
researcher.setLabel(res.getResearcherImportName());
|
||||
researcher.setId(res.getResearcherImportReference());
|
||||
researcher.setReference(res.getResearcherImportReference());
|
||||
researcher.setKey(researcher.getReference().split(":")[0]);
|
||||
researchers.add(researcher);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue