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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 27 18:07:35 CEST 2010


Author: bh
Date: 2010-10-27 18:07:32 +0200 (Wed, 27 Oct 2010)
New Revision: 4044

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MPulsXMLImporter.import_case): Rename
parameter case to components like in the base class.
(MPulsXMLImporter.import_allowed): Rename parameter case to
components like in the base class.  Adapt to components being a
dictionary that contain the main instance tree of the case under
the key 'master'.
Requires libformed 238:bd48e86809b4


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-27 08:56:39 UTC (rev 4043)
+++ base/trunk/ChangeLog	2010-10-27 16:07:32 UTC (rev 4044)
@@ -1,3 +1,13 @@
+2010-10-27  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/case.py (MPulsXMLImporter.import_case): Rename
+	parameter case to components like in the base class.
+	(MPulsXMLImporter.import_allowed): Rename parameter case to
+	components like in the base class.  Adapt to components being a
+	dictionary that contain the main instance tree of the case under
+	the key 'master'.
+	Requires libformed 238:bd48e86809b4
+
 2010-10-27  Torsten Irlaender <torsten at intevation.de>
 
 	* mpulsweb/controllers/auth.py (AuthController.loginAction): Moved

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-10-27 08:56:39 UTC (rev 4043)
+++ base/trunk/mpulsweb/model/case.py	2010-10-27 16:07:32 UTC (rev 4044)
@@ -1379,12 +1379,12 @@
         out.append("</ul>\n")
         return h.literal("".join(out))
 
-    def import_case(self, factory, cursor, case):
-        if self.import_allowed(cursor, case):
-            XMLImporter.import_case(self, factory, cursor, case)
+    def import_case(self, factory, cursor, components):
+        if self.import_allowed(cursor, components):
+            XMLImporter.import_case(self, factory, cursor, components)
 
-    def import_allowed(self, cursor, case):
-        uuid = case.uuid
+    def import_allowed(self, cursor, components):
+        uuid = components["master"].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