Project

General

Profile

Patch #41894 ยป eusure-order-in-find_objects_from_params.patch

Go MAEDA, 2024-11-29 05:21

View differences:

app/controllers/watchers_controller.rb
217 217
    return unless klass < ApplicationRecord
218 218
    return unless klass < Redmine::Acts::Watchable::InstanceMethods
219 219

  
220
    scope = klass.where(:id => Array.wrap(params[:object_id]))
220
    scope = klass.where(:id => Array.wrap(params[:object_id])).order(:id)
221 221
    if klass.reflect_on_association(:project)
222 222
      scope = scope.preload(:project => :enabled_modules)
223 223
    end
    (1-1/1)