Commit 766488f3 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not try to include image tags if image default field value is an empty string (i.e. not set).

This fails physicalPathFromURL.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31679 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb750420
......@@ -259,10 +259,11 @@ bWxQSwUGAAAAAAIAAgCeAAAAhwwAAAAA</string> </value>
<tal:block tal:condition="python: field_type == \'ImageField\'">\n
<text:p text:style-name=\'field-content\'\n
tal:define="preferred_width python: preference_tool.getPreference(\'preferred_%s_image_width\' % (field.get_value(\'image_display\')), 100);\n
width python:(preferred_width / 20.) &lt; max_size and (preferred_width / 20.) or max_size">\n
<tal:block>\n
width python:(preferred_width / 20.) &lt; max_size and (preferred_width / 20.) or max_size;\n
field_value python: field.get_value(\'default\')">\n
<tal:block tal:condition="python: field_value not in (\'\', None,)">\n
<office:include_img tal:attributes="width width;\n
path python: \'/\'.join(request.physicalPathFromURL(field.get_value(\'default\')));"\n
path python: \'/\'.join(request.physicalPathFromURL(field_value));"\n
style="inline-graphic"/>\n
</tal:block>\n
</text:p>\n
......
80
\ No newline at end of file
83
\ 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