--- a/sobjects/cwxmlparser.py Fri Jun 14 16:13:24 2013 +0200
+++ b/sobjects/cwxmlparser.py Fri Jun 14 16:26:25 2013 +0200
@@ -42,7 +42,7 @@
from yams.constraints import BASE_CONVERTERS
from yams.schema import role_name as rn
-from cubicweb import ValidationError, RegistryException, typed_eid
+from cubicweb import ValidationError, RegistryException
from cubicweb.view import Component
from cubicweb.server.sources import datafeed
from cubicweb.server.hook import match_rtype
@@ -218,7 +218,7 @@
return entity
def process_relations(self, entity, rels):
- etype = entity.__regid__
+ etype = entity.cw_etype
for (rtype, role, action), rules in self.source.mapping.get(etype, {}).iteritems():
try:
related_items = rels[role][rtype]
@@ -326,10 +326,10 @@
item['cwtype'] = unicode(node.tag)
item.setdefault('cwsource', None)
try:
- item['eid'] = typed_eid(item['eid'])
+ item['eid'] = int(item['eid'])
except KeyError:
# cw < 3.11 compat mode XXX
- item['eid'] = typed_eid(node.find('eid').text)
+ item['eid'] = int(node.find('eid').text)
item['cwuri'] = node.find('cwuri').text
rels = {}
for child in node: