[Mpuls-commits] r120 - in waska/trunk: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 3 11:22:32 CEST 2008


Author: torsten
Date: 2008-09-03 11:22:30 +0200 (Wed, 03 Sep 2008)
New Revision: 120

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/lib/evaluation.py
Log:
Fixed evaluation on migration


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-09-03 09:05:03 UTC (rev 119)
+++ waska/trunk/ChangeLog.txt	2008-09-03 09:22:30 UTC (rev 120)
@@ -4,6 +4,11 @@
 
 	* waskaweb/templates/casemanagement/search.mako: Changed length to 256
 
+	Fixed evaluation on migration
+
+	* waskaweb/lib/evaluation.py: replaced geburtsland with
+	  staatsangehoerigkeit.
+
 2008-09-02  Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
 	Partial XLS export

Modified: waska/trunk/waskaweb/lib/evaluation.py
===================================================================
--- waska/trunk/waskaweb/lib/evaluation.py	2008-09-03 09:05:03 UTC (rev 119)
+++ waska/trunk/waskaweb/lib/evaluation.py	2008-09-03 09:22:30 UTC (rev 120)
@@ -254,19 +254,19 @@
                 conn = db.getConnection()
                 c1 = conn.cursor()
                 r = [[0,0],[0,0],[0,0]]
-                sql = """select coalesce(muttersprache, -1), coalesce(geburtsland, -1), coalesce(vater, -1), coalesce(mutter, -1) from master_tbl_eval_incm_view m WHERE %s""" % self.where_clause(self.compressed_ids)
+                sql = """select coalesce(muttersprache, -1), coalesce(staatsangehoerigkeit, -1), coalesce(vater, -1), coalesce(mutter, -1) from master_tbl_eval_incm_view m WHERE %s""" % self.where_clause(self.compressed_ids)
                 c1.execute(sql)
                 for case in c1.fetchall():
-                    muttersprache = case[0]
-                    geburtsland   = case[1]
-                    vater         = case[2]
-                    mutter        = case[3]
+                    muttersprache          = case[0]
+                    staatsangehoerigkeit   = case[1]
+                    vater                  = case[2]
+                    mutter                 = case[3]
 
                     # Kein Migrationshintergrund
-                    if (muttersprache == 18) and (geburtsland == 29) and (vater == 1) and (mutter == 1):
+                    if (muttersprache == 18) and (staatsangehoerigkeit == 29) and (vater == 1) and (mutter == 1):
                         r[1][0] += 1
                     # Migrationshintergrund
-                    elif (muttersprache not in (18, -1)) or (geburtsland not in (29, -1)) or (vater not in (0, -1)) or (mutter not in (0, -1)):
+                    elif (muttersprache not in (18, -1)) or (staatsangehoerigkeit not in (29, -1)) or (vater not in (0, -1)) or (mutter not in (0, -1)):
                         r[0][0] += 1
                     # Keine Angabe möglich
                     else:



More information about the Mpuls-commits mailing list