Commit 6c404813 authored by Yorick Peterse's avatar Yorick Peterse

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
parents b3c0253c df55efda
......@@ -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
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment