[Mpuls-commits] r2137 - wasko/branches/2.0/jmdweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 25 09:14:53 CET 2010


Author: torsten
Date: 2010-03-25 09:14:52 +0100 (Thu, 25 Mar 2010)
New Revision: 2137

Modified:
   wasko/branches/2.0/jmdweb/model/case.py
Log:
* jmdweb/model/case.py (Case): Deleted constructor and state
initialisaton. Moved to mpulsbase.


Modified: wasko/branches/2.0/jmdweb/model/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/model/case.py	2010-03-25 08:14:29 UTC (rev 2136)
+++ wasko/branches/2.0/jmdweb/model/case.py	2010-03-25 08:14:52 UTC (rev 2137)
@@ -26,22 +26,15 @@
 # Authors:
 # Torsten Irländer <torsten.irlaender at intevation.de>
 #
-
-import sys
-import traceback
 import logging
 
-import psycopg2.extras
-
-from pylons.i18n import _
-
-from mpulsweb.lib.base import session, g
+from mpulsweb.lib.base import session
 from mpulsweb.lib.db import db
 
 from mpulsweb.model.user import UserObject
 from mpulsweb.model.agencysettings import Agency
 from mpulsweb.model.case import MpulsCase, MpulsCaseFactory, MpulsCaseOverview, \
-    MpulsCaseBundle, MpulsCaseState, SessionCase
+    MpulsCaseBundle, MpulsCaseState
 
 log = logging.getLogger(__name__)
 
@@ -63,6 +56,9 @@
 class CaseOverview(MpulsCaseOverview):
     pass
 
+class State(MpulsCaseState):
+    pass
+
 class CaseFactory(MpulsCaseFactory):
 
     def _initNewCase(self, id):
@@ -84,20 +80,6 @@
 
 class Case(MpulsCase):
 
-    def __init__(self, id=None, preset=None, state_id=None, state_status=None,
-                 state_access=None):
-        MpulsCase.__init__(self, id=id, preset=preset)
-        self.init_state(state_id, state_status, state_access)
-        self.standin = None
-        self.digest = None
-        self.documents = []
-        self.appointments = []
-        self.privacy_statement = None
-        self.discretion_statement = None
-
-    def init_state(self, state_id, status, access):
-        self.state = State(state_id, self.id, status, access)
-
     def setEditor(self, userid):
         """Sets the name of the editor in formular of the case.  First call
         setEditor function in baseclass to transfer the case to the new user.
@@ -119,7 +101,4 @@
             db.recycleConnection(con, cur)
         return self.editor
 
-class State(MpulsCaseState):
-    pass
-
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :



More information about the Mpuls-commits mailing list