[Mpuls-commits] r5789 - base/branches/2.1.0/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 24 12:48:22 CET 2012


Author: torsten
Date: 2012-01-24 12:48:22 +0100 (Tue, 24 Jan 2012)
New Revision: 5789

Modified:
   base/branches/2.1.0/mpulsweb/lib/dialogs.py
Log:
User new load_case function to load case during missing statement dialogs to
ensure the session case is initialised properly.


Modified: base/branches/2.1.0/mpulsweb/lib/dialogs.py
===================================================================
--- base/branches/2.1.0/mpulsweb/lib/dialogs.py	2012-01-24 11:47:15 UTC (rev 5788)
+++ base/branches/2.1.0/mpulsweb/lib/dialogs.py	2012-01-24 11:48:22 UTC (rev 5789)
@@ -8,7 +8,7 @@
 from pylons import request, tmpl_context as c, app_globals as g
 from mpulsweb.lib.translation import _
 
-from mpulsweb.lib.base import render, session
+from mpulsweb.lib.base import render, session, load_case
 from mpulsweb.lib.helpers import url_for 
 from mpulsweb.model.appointment import CaseAppointmentFactory
 
@@ -51,8 +51,7 @@
                 c.targeturl = url_for(controller="/case", action=context,
                                         id=case_id, confirmed=1)
 
-            case = g.case_factory.loadById(case_id)
-
+            case = load_case(case_id)
             statement = case.getPrivacyStatement()
             # Check if there is a "Einverstaendniserklaerung" None if it is
             # not either signed or declined
@@ -95,7 +94,7 @@
                 c.targeturl = url_for(controller="/case", action=context,
                                         id=case_id, confirmed=1)
 
-            case = g.case_factory.loadById(case_id)
+            case = load_case(case_id)
             meta = case.getMeta()
             statement = case.getPrivacyStatement()
             # Only check if there is a "Syncpermission" if the Privacy



More information about the Mpuls-commits mailing list