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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 12 18:28:00 CET 2010


Author: bh
Date: 2010-11-12 18:27:59 +0100 (Fri, 12 Nov 2010)
New Revision: 4173

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MPulsXMLImporter.import_case): Only try
to import logbook if there actually was a logbook for the case


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-11-12 15:16:20 UTC (rev 4172)
+++ base/trunk/ChangeLog	2010-11-12 17:27:59 UTC (rev 4173)
@@ -1,3 +1,8 @@
+2010-11-12  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/case.py (MPulsXMLImporter.import_case): Only try
+	to import logbook if there actually was a logbook for the case
+
 2010-11-12  Torsten Irlaender <torsten at intevation.de>
 
 	* mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po: Issue905: Adapted labeling

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-11-12 15:16:20 UTC (rev 4172)
+++ base/trunk/mpulsweb/model/case.py	2010-11-12 17:27:59 UTC (rev 4173)
@@ -1400,7 +1400,10 @@
     def import_case(self, factory, cursor, components):
         if self.import_allowed(cursor, components):
             tree = XMLImporter.import_case(self, factory, cursor, components)
-            import_logbook(tree, cursor, components.get("tagebuch"))
+            if "tagebuch" in components:
+                # only try to import logbook if there actually was a
+                # logbook for the case
+                import_logbook(tree, cursor, components["tagebuch"])
 
     def import_allowed(self, cursor, components):
         uuid = components["master"].uuid



More information about the Mpuls-commits mailing list