Commit 399bb1ed authored by Jérome Perrin's avatar Jérome Perrin

GadgetField: py3

parent 65c45c7c
import io
from Products.Formulator.Field import ZMIField
from Products.Formulator import Widget
from Products.Formulator.DummyField import fields
from Products.Formulator import Validator
from zLOG import LOG, ERROR
from six.moves import cStringIO as StringIO
from json import dumps
from Acquisition import aq_base
from six.moves.urllib.parse import urljoin
......@@ -151,7 +151,7 @@ class GadgetFieldValidator(Validator.Validator):
if value is not None:
if field.get_value('data_url'):
value=value.split(",")[1]
return StringIO(base64.b64decode(value))
return io.BytesIO(base64.b64decode(value))
return value
......
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