diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-02-27 16:11:02 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-02-27 16:11:02 +0300 |
commit | 6c404813b9f47ee0b320cd9b913da0ca1dbd32bd (patch) | |
tree | 0e5a60c826c1ceab5e9cba1922055d967cf5e6ed /app/models/user.rb | |
parent | b3c0253c53eb0b996ad84ecbe397803fcfef95e0 (diff) | |
parent | df55efda34dafcd85c20ff307ecb20ce1190741a (diff) |
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
Diffstat (limited to 'app/models/user.rb')
-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 8610ca27b7f..982080763d2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 # |