diff --git a/app/models/study_json_record/worker.rb b/app/models/study_json_record/worker.rb index ea6f1a34..14d9cb45 100644 --- a/app/models/study_json_record/worker.rb +++ b/app/models/study_json_record/worker.rb @@ -198,14 +198,12 @@ def flatten(path, data, parent=nil) result = data.map do |item| children = item.delete(child_key.to_s) if children.nil? || children.empty? - # nil - append_parent(item, parent) if parent - item + nil else res = flatten(path[1..-1], children, item) - if res.first.nil? - byebug - end + # if res.first.nil? + # byebug + # end append_parent(res.first, parent) if parent res end