]> source.dussan.org Git - redmine.git/commitdiff
@ProjectQuery#results_scope@ should return @Project::ActiveRecord_Relation@ to keep...
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 3 Nov 2024 11:56:23 +0000 (11:56 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 3 Nov 2024 11:56:23 +0000 (11:56 +0000)
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

index a1bb52a2cf4af400c3dc5a5730d92ae81da9a311..6defbcc834f43288b0be2189b61d7241e78521ad 100644 (file)
@@ -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