entity.py
changeset 9469 032825bbacab
parent 9359 31a1813d53f3
child 9478 2d7521881d3d
equal deleted inserted replaced
9468:39b7a91a3f4c 9469:032825bbacab
   631         """
   631         """
   632         return self.has_eid() and self._cw_is_saved
   632         return self.has_eid() and self._cw_is_saved
   633 
   633 
   634     @cached
   634     @cached
   635     def cw_metainformation(self):
   635     def cw_metainformation(self):
   636         res = self._cw.describe(self.eid, asdict=True)
   636         metas = self._cw.entity_metas(self.eid)
   637         # use 'asource' and not 'source' since this is the actual source,
   637         metas['source'] = self._cw.source_defs()[metas['source']]
   638         # while 'source' is the physical source (where it's stored)
   638         return metas
   639         res['source'] = self._cw.source_defs()[res.pop('asource')]
       
   640         return res
       
   641 
   639 
   642     def cw_check_perm(self, action):
   640     def cw_check_perm(self, action):
   643         self.e_schema.check_perm(self._cw, action, eid=self.eid)
   641         self.e_schema.check_perm(self._cw, action, eid=self.eid)
   644 
   642 
   645     def cw_has_perm(self, action):
   643     def cw_has_perm(self, action):