mirror of
https://github.com/redmine/redmine.git
synced 2026-01-31 03:40:24 +01:00
Fix random test failure by ensuring @WatchersController#find_objects_from_params@ returns results in consistent order (#41894).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23325 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -217,7 +217,7 @@ class WatchersController < ApplicationController
|
||||
return unless klass < ApplicationRecord
|
||||
return unless klass < Redmine::Acts::Watchable::InstanceMethods
|
||||
|
||||
scope = klass.where(:id => Array.wrap(params[:object_id]))
|
||||
scope = klass.where(:id => Array.wrap(params[:object_id])).order(:id)
|
||||
if klass.reflect_on_association(:project)
|
||||
scope = scope.preload(:project => :enabled_modules)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user