Don't include Funder if it's not in the Doi Funder Table
This commit is contained in:
parent
5a3f871c58
commit
c3aff92cd4
|
@ -2095,10 +2095,12 @@ public class DataManagementPlanManager {
|
|||
if (grantReferenceHead.equals("openaire")) {
|
||||
String grantReferenceTail = dmp.getGrant().getReference().split(":")[3];
|
||||
DoiFunder doiFunder = this.apiContext.getOperationsContext().getDatabaseRepository().getDoiFunderDao().findFunderByName(dmp.getGrant().getFunder().getLabel());
|
||||
if (doiFunder != null) {
|
||||
String finalId = doiFunder.getDoi() + "::" + grantReferenceTail;
|
||||
dataBuilder.append(" \"grants\": [{\n");
|
||||
dataBuilder.append(" \t\t\"id\": \"").append(finalId).append("\"\n}],\n");
|
||||
}
|
||||
}
|
||||
|
||||
dataBuilder.append(" \"creators\": [{\n");
|
||||
dataBuilder.append(" \t\t\"name\": \"").append(dmp.getUsers().stream().filter(userDMP -> userDMP.getRole().equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getUser().getName()).append("\",\n");
|
||||
|
|
Loading…
Reference in New Issue