]> cat aescling's git repositories - mastodon.git/commitdiff
Fix content retention policy settings not accepting a blank value (#19248)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 28 Sep 2022 23:15:09 +0000 (01:15 +0200)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 03:13:56 +0000 (22:13 -0500)
app/models/form/admin_settings.rb

index 42da53ed8c84476718fd1a0d46f6dccc82b28e4b..68c98d43f2b7a92815eb9869aba6729f6d7b68bd 100644 (file)
@@ -84,7 +84,7 @@ class Form::AdminSettings
   validates :bootstrap_timeline_accounts, existing_username: { multiple: true }
   validates :show_domain_blocks, inclusion: { in: %w(disabled users all) }
   validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) }
-  validates :media_cache_retention_period, :content_cache_retention_period, :backups_retention_period, numericality: { only_integer: true }
+  validates :media_cache_retention_period, :content_cache_retention_period, :backups_retention_period, numericality: { only_integer: true }, allow_blank: true
 
   def initialize(_attributes = {})
     super