]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/settings/base.py
An initial settings group to support user-defined upper and lower sidebar content...
[osqa.git] / forum / settings / base.py
index f640a7c1f850356895d8be9f1b1ec03cd0b50189..e16097027102d0cb6f19b443aab9cf705897a2e8 100644 (file)
@@ -66,10 +66,12 @@ class BaseSetting(object):
         self.set_value(self.default)
 
     def _parse(self, value):
-        try:
-            return self.base_type(value)
-        except:
-            return value
+        if not isinstance(value, self.base_type):
+            try:
+                return self.base_type(value)
+            except:
+                pass
+        return value        
 
 
 class Setting(object):