[Mpuls-commits] r1843 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 26 12:11:42 CET 2010


Author: torsten
Date: 2010-02-26 12:11:42 +0100 (Fri, 26 Feb 2010)
New Revision: 1843

Modified:
   wasko/branches/2.0/mpulsweb/model/case.py
Log:
Fixed debug message


Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-02-26 11:11:09 UTC (rev 1842)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-02-26 11:11:42 UTC (rev 1843)
@@ -298,8 +298,8 @@
                 log.debug('Current value of %s: %s' % (field.name, value))
                 if value in [-1, "-1", None, ""]:
                     def_value = get_default_value(item)
-                    log.debug("Setting %s to %s" % (field.name, def_value))
                     if def_value:
+                        log.debug("Setting %s to %s" % (field.name, def_value))
                         data["%s:%s" % (field.name, self.id)] = def_value 
             for field in end.fields:
                 item = self._get_formed_item(field.name)
@@ -307,8 +307,8 @@
                 log.debug('Current value of %s: %s' % (field.name, value))
                 if item.getValue() in [-1, "-1", None, ""]:
                     def_value = get_default_value(item)
-                    log.debug("Setting %s to %s" % (field.name, def_value))
                     if def_value:
+                        log.debug("Setting %s to %s" % (field.name, def_value))
                         data["%s:%s" % (field.name, self.id)] = def_value 
 
         # Set values



More information about the Mpuls-commits mailing list