[Mpuls-commits] r5995 - base/trunk/mpulsweb/model

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Tue Jun 26 11:38:27 CEST 2012


Author: bricks
Date: 2012-06-26 11:38:27 +0200 (Tue, 26 Jun 2012)
New Revision: 5995

Modified:
   base/trunk/mpulsweb/model/agencysettings.py
Log:
Convert NULL to None

It's even better to convert a NULL value from the database
to it's python representation None instead of false for the
agency setting values.


Modified: base/trunk/mpulsweb/model/agencysettings.py
===================================================================
--- base/trunk/mpulsweb/model/agencysettings.py	2012-06-25 12:52:38 UTC (rev 5994)
+++ base/trunk/mpulsweb/model/agencysettings.py	2012-06-26 09:38:27 UTC (rev 5995)
@@ -72,8 +72,10 @@
             for row in rows:
                 if row['wert'] == 'on':
                     wert = True
-                elif row['wert'] == 'off' or row['wert'] is None:
+                elif row['wert'] == 'off':
                     wert = False
+                elif row['wert'] is None:
+                    wert = None
                 else:
                     wert = ensure_unicode(row['wert'])
                 self._conf[row['bez']] = wert



More information about the Mpuls-commits mailing list