--- a/cubicweb/schema.py Thu Oct 06 12:15:50 2016 +0200
+++ b/cubicweb/schema.py Sat Oct 01 11:56:27 2016 +0200
@@ -937,20 +937,20 @@
assert not ('fromeid' in kwargs or 'toeid' in kwargs), kwargs
assert action in ('read', 'update')
if 'eid' in kwargs:
- subjtype = _cw.entity_metas(kwargs['eid'])['type']
+ subjtype = _cw.entity_type(kwargs['eid'])
else:
subjtype = objtype = None
else:
assert 'eid' not in kwargs, kwargs
assert action in ('read', 'add', 'delete')
if 'fromeid' in kwargs:
- subjtype = _cw.entity_metas(kwargs['fromeid'])['type']
+ subjtype = _cw.entity_type(kwargs['fromeid'])
elif 'frometype' in kwargs:
subjtype = kwargs.pop('frometype')
else:
subjtype = None
if 'toeid' in kwargs:
- objtype = _cw.entity_metas(kwargs['toeid'])['type']
+ objtype = _cw.entity_type(kwargs['toeid'])
elif 'toetype' in kwargs:
objtype = kwargs.pop('toetype')
else: