[Mpuls-commits] r499 - in wasko/trunk: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Apr 24 10:09:54 CEST 2009
Author: torsten
Date: 2009-04-24 10:09:52 +0200 (Fri, 24 Apr 2009)
New Revision: 499
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/lib/adelexml.py
wasko/trunk/waskaweb/lib/evaluation_new.py
Log:
Fixed issue184
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-04-08 09:53:46 UTC (rev 498)
+++ wasko/trunk/ChangeLog.txt 2009-04-24 08:09:52 UTC (rev 499)
@@ -1,3 +1,11 @@
+2009-04-24 Torsten Irlaender <torsten.irlaender at intevation.de>
+
+ Fixed issue184
+
+ * waskaweb/lib/adelexml.py,
+ waskaweb/lib/evaluation_new.py: Fixed syntax error and wrong table
+ definition in evaluation query.
+
2009-04-07 Torsten Irlaender <torsten.irlaender at intevation.de>
Fixed labeling
Modified: wasko/trunk/waskaweb/lib/adelexml.py
===================================================================
--- wasko/trunk/waskaweb/lib/adelexml.py 2009-04-08 09:53:46 UTC (rev 498)
+++ wasko/trunk/waskaweb/lib/adelexml.py 2009-04-24 08:09:52 UTC (rev 499)
@@ -18,7 +18,7 @@
EXP_TYPE = re.compile('^([0-9]{1,2},?)+$')
EXP_DATE = re.compile('^\d{4}-\d{2}-\d{2}$')
-SQL_TABLE = "master_tbl_eval_total_view"
+SQL_TABLE = "master_tbl_eval_total_view m JOIN ka_status_tbl_view s ON s.master_id = m.id"
SQL_GENDER_FIELD = 'geschlecht'
SQL_FKZ = """(TRUE)"""
#SQL_CM = """(kompetenzfeststellung = '1' or (kompetenzfeststellung = '-1' and
@@ -50,7 +50,7 @@
and s.zugriff < '%s'::date)
-- Kein Begin und Erstgespraech nicht im BZ
and not (
- coalesce(datum_cm_ende, now()) > '2008-12-31'::date) and
+ (coalesce(datum_cm_ende, now()) > '2008-12-31'::date) and
datum_cm_start IS NULL and (coalesce(erstgespraech,
'1970-01-01'::date) < '%s'::date or coalesce(erstgespraech,
'1970-01-01'::date) > '%s'::date)
Modified: wasko/trunk/waskaweb/lib/evaluation_new.py
===================================================================
--- wasko/trunk/waskaweb/lib/evaluation_new.py 2009-04-08 09:53:46 UTC (rev 498)
+++ wasko/trunk/waskaweb/lib/evaluation_new.py 2009-04-24 08:09:52 UTC (rev 499)
@@ -33,9 +33,9 @@
XML_BODY = """<TEILNEHMER><PJTN_TTYP_ID>%s</PJTN_TTYP_ID><PJTN_MANN>%s</PJTN_MANN><PJTN_FRAU>%s</PJTN_FRAU><PJTN_GESAMT>%s</PJTN_GESAMT></TEILNEHMER>"""
XML_FOOTER = """</PROJEKT_TEILNEHMER>"""
-SQL_TABLE = "master_tbl_view"
+SQL_TABLE = "master_tbl_view m"
SQL_GENDER_FIELD = 'geschlecht'
-SQL_BASE_QUERY = """SELECT %s, count(id) FROM %s WHERE %s GROUP BY %s"""
+SQL_BASE_QUERY = """SELECT %s, count(m.id) FROM %s WHERE %s GROUP BY %s"""
SQL_TOTAL = "TRUE"
EVALUATION = {'1': SQL_TOTAL}
@@ -301,7 +301,8 @@
if r[0] == 1: # women
self.women = int(r[1])
except StandardError, err:
- #log.error(err)
+ print err
+ print cur.query
#log.error("Error with query %s" % self.sql)
pass
except:
More information about the Mpuls-commits
mailing list