Skip to content

Commit

Permalink
fix graphql for funders, organizations, data_catalogs. #436 #437 #441
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Mar 30, 2020
1 parent a764a9e commit ec5087e
Show file tree
Hide file tree
Showing 49 changed files with 2,145 additions and 491 deletions.
3 changes: 2 additions & 1 deletion app/controllers/concerns/facetable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def facet_by_resource_type(arr)
end

def facet_by_affiliation(arr)
# generate hash with id and name for each provider in facet
# generate hash with id and name for each affiliation in facet
return [] if arr.blank?

ids = arr.map { |hsh| "\"#{hsh["key"]}\"" }.join(" ")
affiliations = Organization.query(ids, size: 1000)[:data] || []
Expand Down
1 change: 1 addition & 0 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def index
consortium_id: params[:consortium_id],
client_id: params[:client_id],
affiliation_id: params[:affiliation_id],
funder_id: params[:funder_id],
re3data_id: params[:re3data_id],
opendoar_id: params[:opendoar_id],
certificate: params[:certificate],
Expand Down
Loading

0 comments on commit ec5087e

Please sign in to comment.