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

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


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

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


Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-03-25 07:57:03 UTC (rev 2131)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-03-25 08:00:25 UTC (rev 2132)
@@ -574,6 +574,19 @@
             self.phaseslist = PhaseFactory().load(self.id)
         return self.phaseslist
 
+    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 check_consistence(self, fields=None):
         """Raises ConsistenceCheckException if the case is not completly
         consistent up to the current phase. A case is consistent if no required
@@ -768,7 +781,6 @@
                     field.convert(save_getone(params, field.name,
                                               field.default)))
 
-
     def _session_fields(self):
         return g.case_factory.get_session_fields()
 



More information about the Mpuls-commits mailing list