Commit 6246d723 authored by Ivan Tyagov's avatar Ivan Tyagov

Do process and convert uploaded file only if conversion is actually possible.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29779 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6cb586d1
......@@ -88,8 +88,9 @@ merged_content = None\n
\n
try:\n
new_content = context.portal_contributions.newContent(**kw)\n
new_content.processFile()\n
merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n
if new_content.isSupportBaseDataConversion():\n
new_content.processFile()\n
merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n
except ConversionError, Fault:\n
# there are errors during ingestion content\n
failure = 1\n
......
842
\ No newline at end of file
843
\ No newline at end of file
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