[Erp5-report] r42008 kazuhiko - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 4 18:20:23 CET 2011


Author: kazuhiko
Date: Tue Jan  4 18:20:23 2011
New Revision: 42008

URL: http://svn.erp5.org?rev=42008&view=rev
Log:
reingest from url in migratePortalType should not happen if the document already has both 'data' and 'filename'.

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=42008&r1=42007&r2=42008&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Tue Jan  4 18:20:23 2011
@@ -3901,9 +3901,11 @@ class Base( CopyContainer,
             and self.hasProperty(property_id):
         input_kw[property_id] = self.getProperty(property_id)
     if getattr(self, 'hasUrlString', None) is not None and self.hasUrlString():
-      # URL is not stored on document
-      # pass required properties for portal_contributions.newContent
-      input_kw['url'] = self.asURL()
+      # try to reingest from url if data and/or filename is missing.
+      if not 'data' in input_kw or not 'filename' in input_kw:
+        # URL is not stored on document
+        # pass required properties for portal_contributions.newContent
+        input_kw['url'] = self.asURL()
 
     # Use meta transition to jump from one state to another
     # without existing transitions.



More information about the Erp5-report mailing list