mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
FIX: do not impose default min/max validation on hidden site setting
This commit is contained in:
parent
5fab2042f5
commit
dad2024094
2 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue