[Mpuls-commits] r4406 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Dec 20 14:19:14 CET 2010


Author: roland
Date: 2010-12-20 14:19:12 +0100 (Mon, 20 Dec 2010)
New Revision: 4406

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/evaluation.py
Log:
issue1582: correctly ignore system entries in the logbook

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-12-20 10:21:05 UTC (rev 4405)
+++ base/trunk/ChangeLog	2010-12-20 13:19:12 UTC (rev 4406)
@@ -1,3 +1,8 @@
+2010-12-20  Roland Geider <roland.geider at intevation.de>
+
+	* mpulsweb/lib/evaluation.py: issue1582: correctly ignore system
+	  entries (created, etc.) in the logbook
+
 2010-12-13  Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/model/logbook.py,

Modified: base/trunk/mpulsweb/lib/evaluation.py
===================================================================
--- base/trunk/mpulsweb/lib/evaluation.py	2010-12-20 10:21:05 UTC (rev 4405)
+++ base/trunk/mpulsweb/lib/evaluation.py	2010-12-20 13:19:12 UTC (rev 4406)
@@ -59,6 +59,7 @@
             JOIN master_tbl_view m
             ON m.id = l.master_id
             WHERE l.master_id = %(id)s
+            AND l.art != 0
             GROUP BY l.%(table)s, m.id
             ORDER BY l.%(table)s
         """ % {'table': 'typ', 'id': id}
@@ -120,12 +121,8 @@
             cur = conn.cursor()
             cur.execute(self.sql_typ)
             
-            # The "category" statistics above does not count the default entry
-            # "case created" so we will ignore the first entry (which will always
-            # be the case-created one) to match it
-            rows = cur.fetchall()[1:]
+            rows = cur.fetchall()
             
-            
             # Initiate statistical data. Then iterate thorugh the data to
             # generate the real ones. Bit ugly.
             result = {'total': [], 'types':[]}



More information about the Mpuls-commits mailing list