# HG changeset patch # User Sylvain Thénault # Date 1466670251 -7200 # Node ID 98edb500806fbe464b03bbd1e5e168c9e617fb28 # Parent 7844973fe3e094f2b1f975990ec5d3900359b23f [dataimport] Fix rdef loopup in importer diff -r 7844973fe3e0 -r 98edb500806f cubicweb/dataimport/importer.py --- a/cubicweb/dataimport/importer.py Wed Jun 22 16:23:11 2016 +0200 +++ b/cubicweb/dataimport/importer.py Thu Jun 23 10:24:11 2016 +0200 @@ -216,7 +216,7 @@ if (rschema.final and eschema.has_metadata(rtype, 'format') and not rtype + '_format' in entity_dict): entity_dict[rtype + '_format'] = u'text/plain' - if rschema.final and rschema.objects()[0].type == 'Bytes': + if rschema.final and eschema.rdef(rtype).object.type == 'Bytes': entity_dict[rtype] = Binary(entity_dict[rtype]) else: del entity_dict[key]