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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 22 18:10:03 CEST 2010


Author: bh
Date: 2010-10-22 18:10:02 +0200 (Fri, 22 Oct 2010)
New Revision: 4016

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MPulsXMLImporter.import_case): New.
Override this method instead of import_allowed as it's now the
method sub-classes need to override to influence imports.
Requires libformed 226:e3d4dbaa9065


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-22 13:50:52 UTC (rev 4015)
+++ base/trunk/ChangeLog	2010-10-22 16:10:02 UTC (rev 4016)
@@ -1,5 +1,12 @@
 2010-10-22  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/case.py (MPulsXMLImporter.import_case): New.
+	Override this method instead of import_allowed as it's now the
+	method sub-classes need to override to influence imports.
+	Requires libformed 226:e3d4dbaa9065
+
+2010-10-22  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/case_bundle.py
 	(CaseBundleController.export): Omit invisible pages from the list
 	of pages that can be exported.  The user doesn't know about

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-10-22 13:50:52 UTC (rev 4015)
+++ base/trunk/mpulsweb/model/case.py	2010-10-22 16:10:02 UTC (rev 4016)
@@ -1373,7 +1373,12 @@
         out.append("</ul>\n")
         return h.literal("".join(out))
 
-    def import_allowed(self, cursor, uuid):
+    def import_case(self, factory, cursor, case):
+        if self.import_allowed(cursor, case):
+            XMLImporter.import_case(self, factory, cursor, case)
+
+    def import_allowed(self, cursor, case):
+        uuid = case.uuid
         if uuid is None:
             # There's no uuid associated with the case to be imported,
             # so we cannot really do any checks and always allow the



More information about the Mpuls-commits mailing list