Skip to content

Commit

Permalink
Merge pull request #63 from pcvthien/fix/too_few_results
Browse files Browse the repository at this point in the history
Fix for commands returning too few results
  • Loading branch information
pverscha authored Jan 20, 2020
2 parents 11d7baa + a07cd5c commit 3feab83
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
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

0 comments on commit 3feab83

Please # to comment.