Permalink
Browse files

fixed SiteSettings without defaults Type of Null

  • Loading branch information...
1 parent 37175c2 commit 2ca81e8afa81d3a515bf4168de0c203348456ef2 nverba committed Feb 28, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/site_setting_extension.rb
@@ -151,6 +151,10 @@ def add_override!(name,val)
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

0 comments on commit 2ca81e8

Please sign in to comment.