Browse Source

Fix privacy policy being empty if custom setting exists but is empty (#19318)

closed-social-glitch-2
Eugen Rochko 2 years ago
committed by GitHub
parent
commit
678fc4d292
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/privacy_policy.rb

+ 1
- 1
app/models/privacy_policy.rb View File

@ -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)

Loading…
Cancel
Save