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