[Mpuls-commits] r5235 - in base/trunk: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 17 18:05:26 CEST 2011


Author: bh
Date: 2011-08-17 18:05:24 +0200 (Wed, 17 Aug 2011)
New Revision: 5235

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.markAnonymize): New method to
mark the case for anonymization. Derived classes may extend what
the method does.
(MpulsCaseBundle.markAnonymize): Call the new MpulsCase method
markAnonymize instead of setting the case's state directly.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-08-15 08:43:49 UTC (rev 5234)
+++ base/trunk/ChangeLog	2011-08-17 16:05:24 UTC (rev 5235)
@@ -1,3 +1,11 @@
+2011-08-17  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/case.py (MpulsCase.markAnonymize): New method to
+	mark the case for anonymization. Derived classes may extend what
+	the method does.
+	(MpulsCaseBundle.markAnonymize): Call the new MpulsCase method
+	markAnonymize instead of setting the case's state directly.
+
 2011-08-15  Ludwig Reiter <ludwig.reiter at intevation.de>
 
 	* mpulsweb/lib/security.py:

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2011-08-15 08:43:49 UTC (rev 5234)
+++ base/trunk/mpulsweb/model/case.py	2011-08-17 16:05:24 UTC (rev 5235)
@@ -402,7 +402,7 @@
         for id in self.case_list:
             case = factory.loadById(id)
             try:
-                case.getState().setState(4)
+                case.markAnonymize()
                 num += 1
             except Exception, e:
                 log.exception(e)
@@ -1003,6 +1003,10 @@
             log.exception("Error trying to delete case %r" % (self.id,))
         return False
 
+    def markAnonymize(self):
+        """Mark case for anonymization"""
+        self.getState().setState(4)
+
     def anonymize(self):
         """Deleted personal data in the case"""
         conn, cur = None, None



More information about the Mpuls-commits mailing list