mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: do not impose default min/max validation on hidden site setting
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
class IntegerSettingValidator
|
||||
def initialize(opts={})
|
||||
@opts = opts
|
||||
@opts[:min] = 0 unless @opts[:min].present?
|
||||
@opts[:max] = 20000 unless @opts[:max].present?
|
||||
@opts[:min] = 0 unless @opts[:min].present? || @opts[:hidden]
|
||||
@opts[:max] = 20000 unless @opts[:max].present? || @opts[:hidden]
|
||||
end
|
||||
|
||||
def valid_value?(val)
|
||||
|
Reference in New Issue
Block a user