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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 20 13:16:54 CEST 2010


Author: bh
Date: 2010-10-20 13:16:53 +0200 (Wed, 20 Oct 2010)
New Revision: 3998

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MPulsXMLImporter.import_allowed): The
uuid may be None now, in which case we cannot perform any checks
and always allow the import.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-20 10:29:22 UTC (rev 3997)
+++ base/trunk/ChangeLog	2010-10-20 11:16:53 UTC (rev 3998)
@@ -1,3 +1,9 @@
+2010-10-20  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/case.py (MPulsXMLImporter.import_allowed): The
+	uuid may be None now, in which case we cannot perform any checks
+	and always allow the import.
+
 2010-10-20  Torsten Irlaender <torsten at intevation.de>
 
 	* mpulsweb/templates/phase/phase.mako: Issue939: Get url of images

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-10-20 10:29:22 UTC (rev 3997)
+++ base/trunk/mpulsweb/model/case.py	2010-10-20 11:16:53 UTC (rev 3998)
@@ -1365,6 +1365,11 @@
         return h.literal("".join(out))
 
     def import_allowed(self, cursor, 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
+            # import.
+            return True
         if self.uuid_anonymized(cursor, uuid):
             raise XMLImportException(_(u"The case with UUID '%s' was anonymized"
                                        u" already.") % uuid)



More information about the Mpuls-commits mailing list