[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:
parent
ea1795becc
commit
b3ea315393
|
@ -219,7 +219,7 @@ export class DataProviderService {
|
|||
for(let i=0; i<length; i++) {
|
||||
mydata = data[5].length!=undefined ? data[5][i] : data[5];
|
||||
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.length == 0) {
|
||||
//this.dataProviderInfo.organizations = new Array<{"name": string, "url": string}>();
|
||||
|
|
|
@ -390,7 +390,7 @@ export class SearchDataprovidersService {
|
|||
let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][i] : resData['rels']['rel'];
|
||||
|
||||
if(relation.hasOwnProperty("to")) {
|
||||
if(relation['to'].class == "provides" && relation['to'].type == "organization") {
|
||||
if(relation['to'].class == "isProvidedBy" && relation['to'].type == "organization") {
|
||||
if(getOrganizations) {
|
||||
let item: {"name":string, "id":string} = {"name": "", "id": ""};
|
||||
//item['name'] = relation.legalname;
|
||||
|
|
Loading…
Reference in New Issue