Commit 8bb498b8 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

reingest from url in migratePortalType should not happen if the document...

reingest from url in migratePortalType should not happen if the document already has both 'data' and 'filename'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42008 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 01a5211a
...@@ -3901,6 +3901,8 @@ class Base( CopyContainer, ...@@ -3901,6 +3901,8 @@ class Base( CopyContainer,
and self.hasProperty(property_id): and self.hasProperty(property_id):
input_kw[property_id] = self.getProperty(property_id) input_kw[property_id] = self.getProperty(property_id)
if getattr(self, 'hasUrlString', None) is not None and self.hasUrlString(): if getattr(self, 'hasUrlString', None) is not None and self.hasUrlString():
# 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 # URL is not stored on document
# pass required properties for portal_contributions.newContent # pass required properties for portal_contributions.newContent
input_kw['url'] = self.asURL() input_kw['url'] = self.asURL()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment