mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
Update lib/site_settings/type_supervisor.rb
Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
parent
dc63613c96
commit
0fd55acf84
@ -204,7 +204,7 @@ class SiteSettings::TypeSupervisor
|
||||
def validate_value(name, type, val)
|
||||
if type == self.class.types[:enum]
|
||||
if enum_class(name)
|
||||
raise Discourse::InvalidParameters.new("Invalid `#{val}` value for `#{name}`") unless enum_class(name).valid_value?(val)
|
||||
raise Discourse::InvalidParameters.new("Invalid value `#{val}` for `#{name}`") unless enum_class(name).valid_value?(val)
|
||||
else
|
||||
unless (choice = @choices[name])
|
||||
raise Discourse::InvalidParameters.new(name)
|
||||
|
Loading…
Reference in New Issue
Block a user