Make researcher model mapper more safe

This commit is contained in:
George Kalampokis 2020-03-30 15:38:10 +03:00
parent 7cdd2082f7
commit 5a07e4f01b
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ public class Researcher implements DataModel<eu.eudat.data.entities.Researcher,
this.name = entity.getLabel();
this.status = entity.getStatus();
this.reference = entity.getReference();
String source = entity.getReference().substring(0, entity.getReference().indexOf(":"));
String refParts[] = entity.getReference().split(":");
String source = refParts[0];
if (source.equals("dmp"))
this.key = "Internal";
else