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
No related merge requests found
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -58,6 +55,11 @@ ...@@ -58,6 +55,11 @@
from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST\n from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST\n
\n \n
if format in VALID_IMAGE_FORMAT_LIST:\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 # Check if PDF size is not too large for conversion tool\n
content_information = context.getContentInformation()\n content_information = context.getContentInformation()\n
size = content_information.get(\'Page size\')\n size = content_information.get(\'Page size\')\n
...@@ -123,6 +125,7 @@ return True\n ...@@ -123,6 +125,7 @@ return True\n
<string>VALID_IMAGE_FORMAT_LIST</string> <string>VALID_IMAGE_FORMAT_LIST</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>True</string>
<string>content_information</string> <string>content_information</string>
<string>size</string> <string>size</string>
<string>False</string> <string>False</string>
...@@ -131,7 +134,6 @@ return True\n ...@@ -131,7 +134,6 @@ return True\n
<string>width</string> <string>width</string>
<string>height</string> <string>height</string>
<string>maximum_surface</string> <string>maximum_surface</string>
<string>True</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1185 1186
\ No newline at end of file \ 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