[Mpuls-commits] r946 - in wasko/branches/2.0: . waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 27 13:13:11 CET 2010


Author: bh
Date: 2010-01-27 13:13:09 +0100 (Wed, 27 Jan 2010)
New Revision: 946

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/model/case.py
Log:
* waskaweb/model/case.py (LOAD_CASE_SQL, CaseFactory.loadById):
Use the same field name in the SQL query result as in the formed
tree and database.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-27 11:39:02 UTC (rev 945)
+++ wasko/branches/2.0/ChangeLog	2010-01-27 12:13:09 UTC (rev 946)
@@ -1,5 +1,11 @@
 2010-01-27  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/model/case.py (LOAD_CASE_SQL, CaseFactory.loadById):
+	Use the same field name in the SQL query result as in the formed
+	tree and database.
+
+2010-01-27  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/lib/search.py: Remove unused imports.  Import hasRole
 	directly from waskaweb.lib.security instead of accessing it via
 	helpers.

Modified: wasko/branches/2.0/waskaweb/model/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/case.py	2010-01-27 11:39:02 UTC (rev 945)
+++ wasko/branches/2.0/waskaweb/model/case.py	2010-01-27 12:13:09 UTC (rev 946)
@@ -130,9 +130,10 @@
 
 LOAD_CASE_SQL = """
 SELECT
-    name as name_1,
-    vorname as vorname_1,
-    bearbeiter_id, fn as kundennummer,
+    name,
+    vorname,
+    bearbeiter_id,
+    fn,
     erstgespraech,
     datum_cm_ende
 FROM master_tbl_view WHERE id = %(id)s
@@ -415,9 +416,9 @@
             db.recycleConnection(conn, c)
 
         case.id = int(id)
-        case.last_name  = unicode(str(result.get('name_1', '')), 'utf-8')
-        case.first_name = unicode(str(result.get('vorname_1', '')), 'utf-8')
-        case.knr        = unicode(str(result.get('kundennummer', '')), 'utf-8')
+        case.last_name  = unicode(str(result.get('name', '')), 'utf-8')
+        case.first_name = unicode(str(result.get('vorname', '')), 'utf-8')
+        case.knr        = unicode(str(result.get('fn', '')), 'utf-8')
         case.first_meeting = result.get('erstgespraech')
         case.cm_end        = result.get('datum_cm_ende')
         case.editor        = result.get('bearbeiter_id', None)



More information about the Mpuls-commits mailing list