server/schemaserial.py
changeset 10789 d5671a61f281
parent 10683 e83de6c409fd
child 11146 517e7cdd7b1b
--- a/server/schemaserial.py	Tue Oct 13 11:30:48 2015 +0200
+++ b/server/schemaserial.py	Tue Oct 13 11:34:37 2015 +0200
@@ -243,7 +243,7 @@
              'order', 'description', 'indexed', 'fulltextindexed',
              'internationalizable', 'default', 'formula'), values))
         typeparams = extra_props.get(attrs['rdefeid'])
-        attrs.update(json.load(typeparams) if typeparams else {})
+        attrs.update(json.loads(typeparams.getvalue().decode('ascii')) if typeparams else {})
         default = attrs['default']
         if default is not None:
             if isinstance(default, Binary):
@@ -590,7 +590,7 @@
             value = Binary.zpickle(value)
         values[amap.get(prop, prop)] = value
     if extra:
-        values['extra_props'] = Binary(json.dumps(extra))
+        values['extra_props'] = Binary(json.dumps(extra).encode('ascii'))
     relations = ['X %s %%(%s)s' % (attr, attr) for attr in sorted(values)]
     return relations, values