diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-29 07:52:05 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-29 07:52:05 +0000 |
commit | d63678068a2e31dcd9930c0f96e07dc2dcb78b6b (patch) | |
tree | ef8894b40343d9944ae0514750558c2a6863a8a7 | |
parent | e61e40564653d94e8c3be6804fb19f24be105caa (diff) | |
download | redmine-d63678068a2e31dcd9930c0f96e07dc2dcb78b6b.tar.gz redmine-d63678068a2e31dcd9930c0f96e07dc2dcb78b6b.zip |
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
-rw-r--r-- | app/controllers/watchers_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index 34f1ffebe..c957e7a64 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -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 |