Skip to content

Commit

Permalink
Merge pull request #3169 from bitzesty/pb/fix-find-each-with-order
Browse files Browse the repository at this point in the history
FIx Reports::CsvHelper#find_each_with_order
  • Loading branch information
phil-l-brockwell authored Jan 21, 2025
2 parents c0b8435 + ef4eb7f commit abc11e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/reports/csv_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def find_each_with_order(scope, batch_size: 100, &block)
ordered_ids = scope.pluck(:id)

ordered_ids.in_groups_of(batch_size, false) do |ids|
scope.model.where(id: ids).index_by(&:id).values_at(*ordered_ids).each do |fa|
scope.model.where(id: ids).index_by(&:id).values_at(*ordered_ids).compact.each do |fa|
yield fa
end
end
Expand Down

0 comments on commit abc11e0

Please sign in to comment.