Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix for commands returning too few results #63

Merged
merged 3 commits into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/commands/unipept/api_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def inflate_functional_fields(data, original_key_order)
# Each of the values of the annotation_keys is an array. All respective values of each of
# these arrays need to be put together into one hash. (E.g. {a => [1, 2], b=> [x, y]} --> [{a: 1, b: x}, {a: 2, b: y}])
reconstructed_objects = []
(0..annotation_keys[0].length).each do |i|
(0..row[annotation_keys[0]].length).each do |i|
reconstructed_object = {}
annotation_keys.each do |annotation_key|
reconstructed_object[%w[ec_number go_term].include?(annotation_key) ? annotation_key : annotation_key[3, annotation_key.length]] = row[annotation_key][i]
Expand Down
Loading