Commit 36fc6607 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

GadgetField: py3

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