[Mpuls-commits] r3359 - wasko/trunk/waskoweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 10 15:40:58 CEST 2010


Author: roland
Date: 2010-08-10 15:40:57 +0200 (Tue, 10 Aug 2010)
New Revision: 3359

Modified:
   wasko/trunk/waskoweb/controllers/formularpage.py
Log:
formatting, load only appointments from the current case

Modified: wasko/trunk/waskoweb/controllers/formularpage.py
===================================================================
--- wasko/trunk/waskoweb/controllers/formularpage.py	2010-08-10 13:34:22 UTC (rev 3358)
+++ wasko/trunk/waskoweb/controllers/formularpage.py	2010-08-10 13:40:57 UTC (rev 3359)
@@ -202,9 +202,10 @@
             #
             # Searching by name and hoping that it didn't change is... ugly
             search_appointment_sql = u"""SELECT id
-                                    FROM ka_fall_termine_tbl_view
-                                    WHERE name LIKE 'Zu langer Case-Management der Fallakte %s' 
-                                        AND art = 1""" % case_id
+                    FROM ka_fall_termine_tbl_view
+                    WHERE name LIKE 'Zu langer Case-Management der Fallakte %s' 
+                        AND art = 1
+                        AND master_id = %s"""  % (case_data[4], case_id)
             
             cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
             cur.execute(search_appointment_sql)
@@ -223,15 +224,15 @@
             überschreitet die maximale Dauer der Phase Case-Management.
             Bitte korrigieren Sie Ihre Angaben, da die Fallakte andernfalls
             nicht auswertbar ist.''' % (case_data[4], case_data[5], case_data[6]),
-                            'title': u'Zu langer Case-Management der Fallakte %s' % case_id,
-                            'case_id': case_id,
-                            'start_time': datetime.time(00, 00),
-                            'start_date': first_date + max_time_delta,
-                            'end_time': None,
-                            'end_date': None,
-                            'type': u'1', #reminder
-                            'id': u''
-                            }
+            'title': u'Zu langer Case-Management der Fallakte %s' % case_data[4],
+            'case_id': case_id,
+            'start_time': datetime.time(00, 00),
+            'start_date': first_date + max_time_delta,
+            'end_time': None,
+            'end_date': None,
+            'type': u'1', #reminder
+            'id': u''
+            }
             
             appointment.setData(appointment_data)
             appointment.store()



More information about the Mpuls-commits mailing list