Fix critical issue when importing from xml with researchers

This commit is contained in:
George Kalampokis 2022-04-07 17:28:39 +03:00
parent 2a12f1b5be
commit e373baee7e
2 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class Researcher implements DataEntity<Researcher, UUID> {
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
private UUID id;
@Column(name = "\"Label\"")
@Column(name = "\"Label\"", nullable = false, length = 250)
private String label;
@Column(name = "\"Uri\"")

View File

@ -1668,6 +1668,7 @@ public class DataManagementPlanManager {
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.setName(res.getResearcherImportName());
researcher.setReference(res.getResearcherImportReference());
researcher.setKey(researcher.getReference().split(":")[0]);
researchers.add(researcher);