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

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


Author: torsten
Date: 2010-03-25 09:03:36 +0100 (Thu, 25 Mar 2010)
New Revision: 2134

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


Modified: wasko/branches/2.0/jmdweb/model/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/model/case.py	2010-03-25 08:03:01 UTC (rev 2133)
+++ wasko/branches/2.0/jmdweb/model/case.py	2010-03-25 08:03:36 UTC (rev 2134)
@@ -40,7 +40,6 @@
 
 from mpulsweb.model.user import UserObject
 from mpulsweb.model.agencysettings import Agency
-from mpulsweb.model.statement import PrivacyStatement
 from mpulsweb.model.case import MpulsCase, MpulsCaseFactory, MpulsCaseOverview, \
     MpulsCaseBundle, MpulsCaseState, SessionCase
 
@@ -99,22 +98,6 @@
     def init_state(self, state_id, status, access):
         self.state = State(state_id, self.id, status, access)
 
-    def getSessionCase(self):
-        """Return a SessionCase object initialized from the current case"""
-        fields = dict()
-        for field in self.get_session_fields():
-            # FIXME: Ideally we would use
-            # self.get_value(field.name) to get the value.  We use
-            # getattr instead because this compatibility layer
-            # translates None values into strings which some code
-            # (e.g. buildInfofield in
-            # templates/casemanagement/main.mako) relies on.
-            fields[field.alias] = getattr(self, field.alias)
-        signed = self.getPrivacyStatement().isSigned()
-        return SessionCase(self.id, state=self.state,
-                           privacy_statement=signed,
-                           **fields)
-
     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.
@@ -136,19 +119,6 @@
             db.recycleConnection(con, cur)
         return self.editor
 
-    def getPrivacyStatement(self):
-        """Returns the privacy statement of the case"""
-        if not self.privacy_statement is None:
-            return self.privacy_statement
-        try:
-            # Create privacy_statement
-            self.privacy_statement = PrivacyStatement(self, Agency())
-            return self.privacy_statement
-        except:
-            self.privacy_statement = None
-            raise
-        return None
-
     def restore(self):
         #If case has no EE then set EE to undefined on restore
         ps = self.getPrivacyStatement()



More information about the Mpuls-commits mailing list