diff --git a/backend/app/controllers/spree/admin/resource_controller.rb b/backend/app/controllers/spree/admin/resource_controller.rb index 5a126e71c8c..5463bc481e4 100644 --- a/backend/app/controllers/spree/admin/resource_controller.rb +++ b/backend/app/controllers/spree/admin/resource_controller.rb @@ -82,7 +82,9 @@ def update_positions records = model_class.where(id: positions.keys).to_a positions.each do |id, index| - records.find { |r| r.id == id.to_i }&.set_list_position(index) + # To permit the use of UUID as id, we compare models id in database + # and in params under the string representation instead of integer + records.find { |r| r.id.to_s == id }&.set_list_position(index) end end