[Mpuls-commits] r5728 - base/trunk/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 20 14:27:15 CET 2011
Author: torsten
Date: 2011-12-20 14:27:13 +0100 (Tue, 20 Dec 2011)
New Revision: 5728
Modified:
base/trunk/mpulsweb/model/meta.py
Log:
Added new functions to anonymize a meta case and delete incomplete parts of
the meta-case
Modified: base/trunk/mpulsweb/model/meta.py
===================================================================
--- base/trunk/mpulsweb/model/meta.py 2011-12-20 13:24:07 UTC (rev 5727)
+++ base/trunk/mpulsweb/model/meta.py 2011-12-20 13:27:13 UTC (rev 5728)
@@ -210,6 +210,13 @@
else:
raise MetaException(_('Case is not linked with any meta case.'))
+ def anonymize_metacase(self):
+ """Delete incomplte parts of meta-case on the meta-server."""
+ if self.is_linked():
+ get_meta_client().anonymize_case(self.meta_uuid)
+ else:
+ raise MetaException(_('Case is not linked with any meta case.'))
+
def delete_metacase(self):
"""Delete the meta-case on the meta-server.
More precisely, the meta-case is marked for deletion on the
@@ -269,6 +276,13 @@
else:
raise MetaException(_('Case is not linked with any meta case.'))
+ def delete_incomplete_parts_and_anonymize(self):
+ """Delete the inomplete parts of the meta-case and afterwards mark case
+ for anonymisation."""
+ if self.is_linked():
+ self.anonymize_metacase()
+ self.reset()
+
def delete_metacase_and_reset(self):
"""Delete the meta case and afterwards reset the meta settings."""
if self.is_linked():
More information about the Mpuls-commits
mailing list