dataimport.py
branchstable
changeset 7159 3bcccd3ab6b6
parent 7158 0f31a50b144e
child 7160 923013173031
--- a/dataimport.py	Fri Apr 01 01:06:29 2011 +0200
+++ b/dataimport.py	Fri Apr 01 01:06:37 2011 +0200
@@ -74,7 +74,7 @@
 from copy import copy
 from datetime import datetime
 
-from logilab.common import shellutils
+from logilab.common import shellutils, attrdict
 from logilab.common.date import strptime
 from logilab.common.decorators import cached
 from logilab.common.deprecation import deprecated
@@ -305,7 +305,8 @@
         return len(self.items) - 1
 
     def create_entity(self, etype, **data):
-        data['eid'] =  eid = self._put(etype, data)
+        data = attrdict(data)
+        data['eid'] = eid = self._put(etype, data)
         self.eids[eid] = data
         self.types.setdefault(etype, []).append(eid)
         return data