Commit a4bcf4d4 authored by Jérome Perrin's avatar Jérome Perrin

fixup! py2/py3: Make Products code compatible with both python2 and python3.

parent 237c93d4
...@@ -5,11 +5,7 @@ if brain.getValidationState() == 'embedded': ...@@ -5,11 +5,7 @@ if brain.getValidationState() == 'embedded':
else: else:
reference = brain.getReference() reference = brain.getReference()
import six return u"javascript:SelectFile('%s?format=%s')" % (
return six.text_type( reference.replace("'", "\\'"),
"javascript:SelectFile('%s?format=%s')" % ( context.getPortalObject().portal_preferences.getPreferredImageFormat(),
reference.replace("'", "\\'"), )
context.getPortalObject().portal_preferences.getPreferredImageFormat() \ No newline at end of file
),
'utf-8',
)
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