Skip to content

Commit

Permalink
Fix user_id being a frozen string
Browse files Browse the repository at this point in the history
User_id args are strings not arrays at this point
  • Loading branch information
richardhallett committed Jun 15, 2021
1 parent 73d5504 commit 6cb0c77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/graphql/types/person_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def citation_count
end

def response(**args)
user_id = args[:user_id].present? ? args[:user_id] << object[:id] : object[:id]
# Combine the person user id with args user_id(s)
user_id = args[:user_id].nil? ? object[:id] : object[:id] + "," + args[:user_id]

Doi.gql_query(
args[:query],
Expand Down

0 comments on commit 6cb0c77

Please sign in to comment.