server/sources/native.py
changeset 10473 23a2fa8cb725
parent 10446 1e6655cff5ab
child 10477 ee21c559f94f
--- a/server/sources/native.py	Fri Jun 26 14:04:16 2015 +0200
+++ b/server/sources/native.py	Fri Jun 26 13:04:25 2015 +0200
@@ -897,7 +897,7 @@
         if extid is not None:
             assert isinstance(extid, str)
             extid = b64encode(extid)
-        attrs = {'type': entity.cw_etype, 'eid': entity.eid, 'extid': extid and unicode(extid),
+        attrs = {'type': unicode(entity.cw_etype), 'eid': entity.eid, 'extid': extid and unicode(extid),
                  'asource': unicode(source.uri)}
         self._handle_insert_entity_sql(cnx, self.sqlgen.insert('entities', attrs), attrs)
         # insert core relations: is, is_instance_of and cw_source