Commit f0bc4ca9 authored by Ivan Tyagov's avatar Ivan Tyagov

We do not have any data so we can allow conversion to proceed and lead to a...

We do not have any data so we can allow conversion to proceed and lead to a different conversion error rather than raise Unautorized.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39066 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a43aed55
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
......@@ -58,6 +55,11 @@
from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST\n
\n
if format in VALID_IMAGE_FORMAT_LIST:\n
# we do not have any data so we can allow conversion to proceed and lead to a \n
# different conversion errorrather than raise Unautorized\n
if not context.hasData():\n
return True\n
\n
# Check if PDF size is not too large for conversion tool\n
content_information = context.getContentInformation()\n
size = content_information.get(\'Page size\')\n
......@@ -123,6 +125,7 @@ return True\n
<string>VALID_IMAGE_FORMAT_LIST</string>
<string>_getattr_</string>
<string>context</string>
<string>True</string>
<string>content_information</string>
<string>size</string>
<string>False</string>
......@@ -131,7 +134,6 @@ return True\n
<string>width</string>
<string>height</string>
<string>maximum_surface</string>
<string>True</string>
</tuple>
</value>
</item>
......
1185
\ No newline at end of file
1186
\ 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