diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d671c291ec5..cfb8cd3819d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -284,11 +284,11 @@ class User < ApplicationRecord scope :with_dashboard, -> (dashboard) { where(dashboard: dashboard) } scope :with_visible_profile, -> (user) { if user.nil? - where(private_profile: [false, nil]) + where(private_profile: false) elsif user.admin? all else - where(private_profile: [false, nil]).or where(id: user.id) + where(private_profile: false).or where(id: user.id) end } |