Fixes bug on not assigning the right "external source provider" on fetched Funders.
This commit is contained in:
parent
f59881d7aa
commit
e0c0f4ec09
|
@ -45,8 +45,12 @@ public class FunderManager {
|
|||
eu.eudat.models.data.funder.Funder funder = apiContext.getOperationsContext().getBuilderFactory().getBuilder(FunderBuilder.class)
|
||||
.reference(externalListingItem.getRemoteId()).label(externalListingItem.getName())
|
||||
.status(eu.eudat.data.entities.Funder.Status.fromInteger(0))
|
||||
.source(externalListingItem.getTag())
|
||||
.build();
|
||||
if (externalListingItem.getSource() != null) {
|
||||
funder.setSource(externalListingItem.getSource());
|
||||
} else {
|
||||
funder.setSource(externalListingItem.getTag());
|
||||
}
|
||||
|
||||
funders.add(funder);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ public class RemoteFetcher {
|
|||
|
||||
private void ifFunderQueryExist(UrlConfiguration urlConfiguration, ExternalUrlCriteria externalUrlCriteria) {
|
||||
if (urlConfiguration.getFunderQuery() != null) {
|
||||
if (externalUrlCriteria.getFunderId() != null) {
|
||||
if (externalUrlCriteria.getFunderId() != null && urlConfiguration.getFunderQuery().startsWith("dmp:")) {
|
||||
urlConfiguration.setUrl(urlConfiguration.getUrl().replace("{funderQuery}", urlConfiguration.getFunderQuery()));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -13,6 +13,7 @@ public class FundersExternalSourcesModel extends ExternalListingItem<FundersExte
|
|||
model.setUri(item.get("uri"));
|
||||
model.setName(item.get("name"));
|
||||
model.setDescription(item.get("description"));
|
||||
model.setSource(item.get("source"));
|
||||
model.setTag(item.get("tag"));
|
||||
this.add(model);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue