summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-09 18:01:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-09 18:01:04 +0000
commit151892c3131a22ec7786362d79a207c30851fe5f (patch)
treeb0c485503badba1d7651885405f3dae9f297f4f0 /app/models/principal.rb
parentc2fe2d0c0615b01dd61088b5e99e9b3db9eb7529 (diff)
downloadredmine-151892c3131a22ec7786362d79a207c30851fe5f.tar.gz
redmine-151892c3131a22ec7786362d79a207c30851fe5f.zip
Fixed that Project.uniq.visible errors under certain conditions (#21182).
Patch by Redmine CRM. git-svn-id: http://svn.redmine.org/redmine/trunk@14857 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r--app/models/principal.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index c7addd9df..f3c883532 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -28,8 +28,7 @@ class Principal < ActiveRecord::Base
has_many :memberships,
lambda {preload(:project, :roles).
joins(:project).
- where("#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}").
- order("#{Project.table_name}.name")},
+ where("#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}")},
:class_name => 'Member',
:foreign_key => 'user_id'
has_many :projects, :through => :memberships