[Trunk | Library]: dataProvider.service.ts & searchDataproviders.service.ts:

[Bug fix] #6678 ticket - In order to get "organizations related to a datasource" (at most one), parse rels.rel.to.class == "isProvidedBy" (instead of rels.rel.to.class == "provides").


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60994 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2021-05-12 15:00:19 +00:00
parent ea1795becc
commit b3ea315393
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ export class DataProviderService {
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
mydata = data[5].length!=undefined ? data[5][i] : data[5]; mydata = data[5].length!=undefined ? data[5][i] : data[5];
if(mydata.hasOwnProperty("to")) { if(mydata.hasOwnProperty("to")) {
if(mydata['to'].class == "provides" && mydata['to'].type == "organization") { if(mydata['to'].class == "isProvidedBy" && mydata['to'].type == "organization") {
//if(this.dataProviderInfo.organizations == undefined) { //if(this.dataProviderInfo.organizations == undefined) {
if(this.dataProviderInfo.organizations.length == 0) { if(this.dataProviderInfo.organizations.length == 0) {
//this.dataProviderInfo.organizations = new Array<{"name": string, "url": string}>(); //this.dataProviderInfo.organizations = new Array<{"name": string, "url": string}>();

View File

@ -390,7 +390,7 @@ export class SearchDataprovidersService {
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][i] : resData['rels']['rel']; let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][i] : resData['rels']['rel'];
if(relation.hasOwnProperty("to")) { if(relation.hasOwnProperty("to")) {
if(relation['to'].class == "provides" && relation['to'].type == "organization") { if(relation['to'].class == "isProvidedBy" && relation['to'].type == "organization") {
if(getOrganizations) { if(getOrganizations) {
let item: {"name":string, "id":string} = {"name": "", "id": ""}; let item: {"name":string, "id":string} = {"name": "", "id": ""};
//item['name'] = relation.legalname; //item['name'] = relation.legalname;