diff options
author | Camil Staps <info@camilstaps.nl> | 2019-02-08 17:05:22 +0300 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 21:49:17 +0300 |
commit | 4f76331ddcfcaf32a868b6e814474fbac6c343eb (patch) | |
tree | e0d9359fac9a7b5df0b3b6de1e19a27e6e2987a6 /app | |
parent | 73e6ba448db379216f5b703b11295f3751fee16a (diff) |
Make users.private_profile default false (previously had no default value)
Diffstat (limited to 'app')
-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 } |