mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Float site settings were marked as overridden, reset didn't work.
This commit is contained in:
@ -131,7 +131,7 @@ module SiteSettingExtension
|
||||
opts = {
|
||||
setting: s,
|
||||
description: description(s),
|
||||
default: v,
|
||||
default: v.to_s,
|
||||
type: type.to_s,
|
||||
value: value.to_s,
|
||||
category: categories[s]
|
||||
@ -328,6 +328,8 @@ module SiteSettingExtension
|
||||
|
||||
def convert(value, type)
|
||||
case type
|
||||
when types[:float]
|
||||
value.to_f
|
||||
when types[:fixnum]
|
||||
value.to_i
|
||||
when types[:string], types[:list], types[:enum]
|
||||
|
Reference in New Issue
Block a user