Skip to content

Commit

Permalink
Merge pull request #17421 from Ladas/always_reconnect_the_oldest_entity
Browse files Browse the repository at this point in the history
Always reconnect the oldest entity
  • Loading branch information
agrare authored May 14, 2018
2 parents 9dc1622 + caea00f commit e915a3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/manager_refresh/inventory_collection_default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ManagerRefresh::InventoryCollectionDefault

inventory_objects_index.each_slice(100) do |batch|
batch_refs = batch.map(&:first)
relation.where(inventory_collection.manager_ref.first => batch_refs).each do |record|
relation.where(inventory_collection.manager_ref.first => batch_refs).order(:id => :asc).each do |record|
index = inventory_collection.object_index_with_keys(inventory_collection.manager_ref_to_cols, record)

# We need to delete the record from the inventory_objects_index
Expand Down

0 comments on commit e915a3f

Please sign in to comment.