From 18bd618dde2e85e66b31f20b80d9e56e97b0e60d Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 22 Jul 2019 10:13:35 +0200 Subject: [PATCH] fix organization-researcher connection --- app/graphql/types/organization_type.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/graphql/types/organization_type.rb b/app/graphql/types/organization_type.rb index 428bc32e0..70442d75f 100644 --- a/app/graphql/types/organization_type.rb +++ b/app/graphql/types/organization_type.rb @@ -56,8 +56,8 @@ def softwares(**args) end def researchers(**args) - ids = Event.query(nil, obj_id: object[:id], citation_type: "Organization-Person").results.to_a.map do |e| - e.subj_id + ids = Event.query(nil, obj_id: object.id, citation_type: "Organization-Person").results.to_a.map do |e| + orcid_from_url(e.subj_id) end ElasticsearchLoader.for(Researcher).load_many(ids) end