[Mpuls-commits] r5583 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Nov 15 16:31:50 CET 2011


Author: torsten
Date: 2011-11-15 16:31:49 +0100 (Tue, 15 Nov 2011)
New Revision: 5583

Modified:
   base/trunk/mpulsweb/model/case.py
Log:
Add new attrbute editor_id which can be set when creating a case object.


Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2011-11-15 14:13:45 UTC (rev 5582)
+++ base/trunk/mpulsweb/model/case.py	2011-11-15 15:31:49 UTC (rev 5583)
@@ -546,7 +546,7 @@
 class MpulsCase:
 
     def __init__(self, id=None, preset=None, state_id=None, state_status=None,
-                 state_access=None, state_phase=None, tags=None):
+                 state_access=None, state_phase=None, tags=None, editor_id=None):
         self.id = id
         if preset is None:
             preset = dict()
@@ -558,6 +558,7 @@
         self.appointments = []
         self.tags = tags
         self.privacy_statement = None
+        self.editor_id = editor_id 
         #self.digest = None (TODO: Seems not to be used)
         self.init_state(state_id, state_status, state_access, state_phase)
 
@@ -1202,12 +1203,14 @@
         following fields that will be used to instantiate the State
         object: s_id, status, zugriff
         """
-        return self.case_cls(result["id"], preset=self._build_preset(result),
+        return self.case_cls(result["id"],
+                             preset=self._build_preset(result),
                              state_id=result["s_id"],
                              state_status=result["status"],
                              state_access=result["zugriff"],
                              state_phase=result["phase"],
-                             tags = result["tags"])
+                             tags = result["tags"],
+                             editor_id = result["bearbeiter_id"])
 
     def createNew(self, init=True, uuid=None, data=None):
         """Create a new case in the database and return the case object.



More information about the Mpuls-commits mailing list