summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-03 11:56:23 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-03 11:56:23 +0000
commit586020045be78f394c09f08b6409864c6804cd21 (patch)
tree14c7c3fdc711810067a7401e1fed4119773b4c81
parentbb0e2114a0977a04fc3579f22e5f9eae58a0dee4 (diff)
downloadredmine-586020045be78f394c09f08b6409864c6804cd21.tar.gz
redmine-586020045be78f394c09f08b6409864c6804cd21.zip
@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
-rw-r--r--app/models/project_query.rb3
1 files changed, 1 insertions, 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