From 37f10cbb5452d32f7192682b89dd3ceba50afafa Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 30 Jun 2019 13:28:28 +0200 Subject: [PATCH] fix citation-type for researchers. #299 --- app/graphql/types/dataset_connection_with_meta_type.rb | 2 +- app/graphql/types/publication_connection_with_meta_type.rb | 2 +- app/graphql/types/researcher_connection_with_meta_type.rb | 6 +++--- app/graphql/types/software_connection_with_meta_type.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/graphql/types/dataset_connection_with_meta_type.rb b/app/graphql/types/dataset_connection_with_meta_type.rb index 4dbcc94a8..3b4230efb 100644 --- a/app/graphql/types/dataset_connection_with_meta_type.rb +++ b/app/graphql/types/dataset_connection_with_meta_type.rb @@ -25,7 +25,7 @@ def software_connection_count end def researcher_connection_count - Event.query(nil, citation_type: "Dataset-Researcher").results.total + Event.query(nil, citation_type: "Dataset-Person").results.total end def funder_connection_count diff --git a/app/graphql/types/publication_connection_with_meta_type.rb b/app/graphql/types/publication_connection_with_meta_type.rb index c44a57a48..d1de6c710 100644 --- a/app/graphql/types/publication_connection_with_meta_type.rb +++ b/app/graphql/types/publication_connection_with_meta_type.rb @@ -25,7 +25,7 @@ def software_connection_count end def researcher_connection_count - Event.query(nil, citation_type: "Researcher-ScholarlyArticle").results.total + Event.query(nil, citation_type: "Person-ScholarlyArticle").results.total end def funder_connection_count diff --git a/app/graphql/types/researcher_connection_with_meta_type.rb b/app/graphql/types/researcher_connection_with_meta_type.rb index 07a2e28e7..295e5b7ff 100644 --- a/app/graphql/types/researcher_connection_with_meta_type.rb +++ b/app/graphql/types/researcher_connection_with_meta_type.rb @@ -16,14 +16,14 @@ def total_count end def publication_connection_count - Event.query(nil, citation_type: "Researcher-ScholarlyArticle").results.total + Event.query(nil, citation_type: "Person-ScholarlyArticle").results.total end def dataset_connection_count - Event.query(nil, citation_type: "Dataset-Researcher").results.total + Event.query(nil, citation_type: "Dataset-Person").results.total end def software_connection_count - Event.query(nil, citation_type: "Researcher-SoftwareSourceCode").results.total + Event.query(nil, citation_type: "Person-SoftwareSourceCode").results.total end end diff --git a/app/graphql/types/software_connection_with_meta_type.rb b/app/graphql/types/software_connection_with_meta_type.rb index bca5ddc87..6b2c66d6f 100644 --- a/app/graphql/types/software_connection_with_meta_type.rb +++ b/app/graphql/types/software_connection_with_meta_type.rb @@ -25,7 +25,7 @@ def dataset_connection_count end def researcher_connection_count - Event.query(nil, citation_type: "Researcher-SoftwareSourceCode").results.total + Event.query(nil, citation_type: "Person-SoftwareSourceCode").results.total end def funder_connection_count