diff options
author | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2016-11-16 01:49:45 -0800 |
---|---|---|
committer | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2016-11-16 01:49:45 -0800 |
commit | 00d9d7678b9df3a25c4f4e8f210c9d17a798c9cd (patch) | |
tree | 5c1c729224c3b7cb56d8a3f928211537a28bac1a /app/models | |
parent | f27f9803833f72d7f62534c195539dcdef2e3ccd (diff) | |
download | gitlab-ce-00d9d7678b9df3a25c4f4e8f210c9d17a798c9cd.tar.gz |
fix "Without projects" filter
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 3813df6684e..5a2b232c4ed 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -173,7 +173,7 @@ class User < ActiveRecord::Base scope :external, -> { where(external: true) } scope :active, -> { with_state(:active) } scope :not_in_project, ->(project) { project.users.present? ? where("id not in (:ids)", ids: project.users.map(&:id) ) : all } - scope :without_projects, -> { where('id NOT IN (SELECT DISTINCT(user_id) FROM members)') } + scope :without_projects, -> { where('id NOT IN (SELECT DISTINCT(user_id) FROM members WHERE user_id IS NOT NULL AND requested_at IS NULL)') } scope :todo_authors, ->(user_id, state) { where(id: Todo.where(user_id: user_id, state: state).select(:author_id)) } def self.with_two_factor |