[Mpuls-commits] r3224 - base/trunk/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jul 21 16:26:17 CEST 2010


Author: torsten
Date: 2010-07-21 16:26:17 +0200 (Wed, 21 Jul 2010)
New Revision: 3224

Modified:
   base/trunk/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (ViewRenderer._renderNumeric.uformat_numeric): Fixed function to return "unbekannt" if value is decimal.Deciaml(-9999999)


Modified: base/trunk/mpulsweb/lib/renderer.py
===================================================================
--- base/trunk/mpulsweb/lib/renderer.py	2010-07-21 13:44:14 UTC (rev 3223)
+++ base/trunk/mpulsweb/lib/renderer.py	2010-07-21 14:26:17 UTC (rev 3224)
@@ -31,6 +31,7 @@
 import re
 from cgi import escape
 import logging
+import decimal
 
 from mpulsweb.lib.translation import _, ungettext
 
@@ -564,7 +565,7 @@
     def _renderNumeric(self, node):
 
         def uformat_numeric(value):
-            if value == float(-9999999):
+            if value == decimal.Decimal(-9999999):
                 return "unbekannt"
             return value
 



More information about the Mpuls-commits mailing list