[Mpuls-commits] r2136 - wasko/branches/2.0/mpulsweb/model

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


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

Modified:
   wasko/branches/2.0/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.__init__): Copied from jmdweb.


Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-03-25 08:04:30 UTC (rev 2135)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-03-25 08:14:29 UTC (rev 2136)
@@ -447,14 +447,24 @@
 
 class MpulsCase:
 
-    def __init__(self, id=None, preset=None):
+    def __init__(self, id=None, preset=None, state_id=None, state_status=None,
+                 state_access=None):
         self.id = id
         if preset is None:
             preset = dict()
         self.preset = preset
         self.formed_instance = None
         self.phaseslist = None
+        self.standin = None
+        self.documents = []
+        self.appointments = []
+        self.privacy_statement = None
+        #self.digest = None (TODO: Seems not to be used)
+        self.init_state(state_id, state_status, state_access)
 
+    def init_state(self, state_id, status, access):
+        self.state = MpulsCaseState(state_id, self.id, status, access)
+
     @classmethod
     def set_fields(cls, raw_fields):
         fields = [Field(**kw) for kw in raw_fields]



More information about the Mpuls-commits mailing list