2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

fixed SiteSettings without defaults Type of Null

This commit is contained in:
nverba 2013-02-28 00:24:43 +00:00
parent 37175c264a
commit 2ca81e8afa

View file

@ -151,6 +151,10 @@ module SiteSettingExtension
val = val.to_i val = val.to_i
end end
if type == Types::Null && val != ''
type = get_data_type(val)
end
if setting if setting
setting.value = val setting.value = val
setting.data_type = type setting.data_type = type