mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-19 15:38:17 +00: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:
parent
e61e405646
commit
d63678068a
@ -217,7 +217,7 @@ class WatchersController < ApplicationController
|
|||||||
return unless klass < ApplicationRecord
|
return unless klass < ApplicationRecord
|
||||||
return unless klass < Redmine::Acts::Watchable::InstanceMethods
|
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)
|
if klass.reflect_on_association(:project)
|
||||||
scope = scope.preload(:project => :enabled_modules)
|
scope = scope.preload(:project => :enabled_modules)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user