From 586020045be78f394c09f08b6409864c6804cd21 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 3 Nov 2024 11:56:23 +0000 Subject: [PATCH] @ProjectQuery#results_scope@ should return @Project::ActiveRecord_Relation@ to keep the backward compatibility (#41678, #23954). Patch by Nishida Yuya (user:nishidayuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23187 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project_query.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/project_query.rb b/app/models/project_query.rb index a1bb52a2c..6defbcc83 100644 --- a/app/models/project_query.rb +++ b/app/models/project_query.rb @@ -166,11 +166,10 @@ class ProjectQuery < Query scope = scope.preload(:parent) end - projects = scope.to_a if has_column?(:last_activity_date) Project.load_last_activity_date(scope) end - projects + scope end end -- 2.39.5