From: Marius Balteanu Date: Sun, 3 Nov 2024 11:56:23 +0000 (+0000) Subject: @ProjectQuery#results_scope@ should return @Project::ActiveRecord_Relation@ to keep... X-Git-Tag: 6.0.0~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=586020045be78f394c09f08b6409864c6804cd21;p=redmine.git @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 --- 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