From 2ca81e8afa81d3a515bf4168de0c203348456ef2 Mon Sep 17 00:00:00 2001 From: nverba Date: Thu, 28 Feb 2013 00:24:43 +0000 Subject: [PATCH] fixed SiteSettings without defaults Type of Null --- lib/site_setting_extension.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/site_setting_extension.rb b/lib/site_setting_extension.rb index 5d78c224df3..95e87d3b40c 100644 --- a/lib/site_setting_extension.rb +++ b/lib/site_setting_extension.rb @@ -151,6 +151,10 @@ module SiteSettingExtension val = val.to_i end + if type == Types::Null && val != '' + type = get_data_type(val) + end + if setting setting.value = val setting.data_type = type