about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-08 08:34:00 +0200
committerGitHub <noreply@github.com>2022-10-08 08:34:00 +0200
commit678fc4d292664550df554a224b8fd59dcef20d35 (patch)
tree9b67b5e7a125de71486acd1cb2765a4bca82fb26
parentd4b0aa74500419730525025b05513235aa477841 (diff)
Fix privacy policy being empty if custom setting exists but is empty (#19318)
-rw-r--r--app/models/privacy_policy.rb2
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)