From 678fc4d292664550df554a224b8fd59dcef20d35 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Sat, 8 Oct 2022 08:34:00 +0200
Subject: [PATCH] Fix privacy policy being empty if custom setting exists but
 is empty (#19318)

---
 app/models/privacy_policy.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)