[Mpuls-commits] r1697 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 23 15:46:53 CET 2010
Author: torsten
Date: 2010-02-23 15:46:53 +0100 (Tue, 23 Feb 2010)
New Revision: 1697
Modified:
wasko/branches/2.0/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py (_loadCase): New. general function to load a case.
Modified: wasko/branches/2.0/mpulsweb/lib/base.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-23 14:45:49 UTC (rev 1696)
+++ wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-23 14:46:53 UTC (rev 1697)
@@ -47,6 +47,7 @@
import mpulsweb.lib.helpers as h
from mpulsweb.lib.security import getDbName, userIdentity
+from mpulsweb.model.case import LoadCaseNotExistsError
# These names are exported from this module largely for historical
# reasons. Ideally the module should probably only export
@@ -70,6 +71,13 @@
self.db = None
self.page_cache = None
+ def _loadCase(self, id):
+ factory = g.case_factory
+ try:
+ return factory.loadById(id)
+ except LoadCaseNotExistsError, err:
+ raise
+
def __before__(self):
try:
storedHash = session['AUTH']
More information about the Mpuls-commits
mailing list