Fix minor issues when creating a researcher

This commit is contained in:
George Kalampokis 2021-04-30 11:08:06 +03:00
parent b486a27e48
commit cdae5ae574
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ public class Researcher implements DataModel<eu.eudat.data.entities.Researcher,
researcher.setId(UUID.fromString(this.id));
if (this.key != null) {
if (this.key.toLowerCase().equals("internal")) {
if (this.reference != null && "dmp".equals(this.reference.substring(0, 3))) {
if (this.reference != null) {
researcher.setReference(this.reference);
} else {
researcher.setReference("dmp:" + this.id);

View File

@ -40,7 +40,7 @@ public class Researcher implements DataModel<eu.eudat.data.entities.Researcher,
researcher.setCreated(new Date());
researcher.setLabel(this.firstName + " " + this.lastName);
researcher.setModified(new Date());
researcher.setReference("dmp:" + researcher.getLabel());
researcher.setReference("dmp:" + researcher.getReference());
researcher.setStatus((short) 0);
return researcher;
}