diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-08 08:34:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 08:34:00 +0200 |
commit | 678fc4d292664550df554a224b8fd59dcef20d35 (patch) | |
tree | 9b67b5e7a125de71486acd1cb2765a4bca82fb26 | |
parent | d4b0aa74500419730525025b05513235aa477841 (diff) |
Fix privacy policy being empty if custom setting exists but is empty (#19318)
-rw-r--r-- | app/models/privacy_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/privacy_policy.rb b/app/models/privacy_policy.rb index b93b6cf35..36cbf1882 100644 --- a/app/models/privacy_policy.rb +++ b/app/models/privacy_policy.rb @@ -68,7 +68,7 @@ class PrivacyPolicy < ActiveModelSerializers::Model def self.current custom = Setting.find_by(var: 'site_terms') - if custom + if custom&.value.present? new(text: custom.value, updated_at: custom.updated_at) else new(text: DEFAULT_PRIVACY_POLICY, updated_at: DEFAULT_UPDATED_AT) |