Merge branch '43304-simplify-filtering-non-human-users' into 'master'

Simplify filtering of non-human users.

Closes #43304

See merge request gitlab-org/gitlab-ce!17288
This commit is contained in:
Yorick Peterse 2018-02-27 13:11:02 +00:00
commit 6c404813b9
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ class User < ActiveRecord::Base
end
def self.non_internal
where(Hash[internal_attributes.zip([[false, nil]] * internal_attributes.size)])
where(internal_attributes.map { |attr| "#{attr} IS NOT TRUE" }.join(" AND "))
end
#