cubicweb/hooks/syncschema.py
changeset 11765 9cb215e833b0
parent 11763 39df042f4ab4
child 11767 432f87a63057
--- a/cubicweb/hooks/syncschema.py	Thu Oct 06 12:15:50 2016 +0200
+++ b/cubicweb/hooks/syncschema.py	Sat Oct 01 11:56:27 2016 +0200
@@ -1347,7 +1347,7 @@
 
     def __call__(self):
         action = self.rtype.split('_', 1)[0]
-        if self._cw.entity_metas(self.eidto)['type'] == 'CWGroup':
+        if self._cw.entity_type(self.eidto) == 'CWGroup':
             MemSchemaPermissionAdd(self._cw, action=action, eid=self.eidfrom,
                                    group_eid=self.eidto)
         else:  # RQLExpression
@@ -1368,7 +1368,7 @@
         if self._cw.deleted_in_transaction(self.eidfrom):
             return
         action = self.rtype.split('_', 1)[0]
-        if self._cw.entity_metas(self.eidto)['type'] == 'CWGroup':
+        if self._cw.entity_type(self.eidto) == 'CWGroup':
             MemSchemaPermissionDel(self._cw, action=action, eid=self.eidfrom,
                                    group_eid=self.eidto)
         else:  # RQLExpression