]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 19:36:11 +0000 (19:36 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 19:36:11 +0000 (19:36 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13525 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 8b1f2f4563a9f959264f501cb60b977953c399eb..19108b2a36390441e7821f634bb147a9306fcedb 100644 (file)
@@ -438,8 +438,8 @@ class Project < ActiveRecord::Base
       Tracker.
         joins(:projects).
         joins("JOIN #{EnabledModule.table_name} ON #{EnabledModule.table_name}.project_id = #{Project.table_name}.id AND #{EnabledModule.table_name}.name = 'issue_tracking'").
-        select("DISTINCT #{Tracker.table_name}.*").
-        where("#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ? AND #{Project.table_name}.status <> #{STATUS_ARCHIVED}", lft, rgt).
+        where("#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ? AND #{Project.table_name}.status <> ?", lft, rgt, STATUS_ARCHIVED).
+        uniq.
         sorted.
         to_a
   end