entity.py
branchstable
changeset 8657 5ab6ec83d5ba
parent 8651 353bbd17a8b6
child 8660 aa865f3be80d
equal deleted inserted replaced
8656:9bb93efa1952 8657:5ab6ec83d5ba
   537 
   537 
   538     def __json_encode__(self):
   538     def __json_encode__(self):
   539         """custom json dumps hook to dump the entity's eid
   539         """custom json dumps hook to dump the entity's eid
   540         which is not part of dict structure itself
   540         which is not part of dict structure itself
   541         """
   541         """
   542         self.complete()
       
   543         dumpable = self.cw_attr_cache.copy()
   542         dumpable = self.cw_attr_cache.copy()
   544         dumpable['eid'] = self.eid
   543         dumpable['eid'] = self.eid
   545         dumpable['__cwetype__'] = self.__regid__
       
   546         return dumpable
   544         return dumpable
   547 
   545 
   548     def cw_adapt_to(self, interface):
   546     def cw_adapt_to(self, interface):
   549         """return an adapter the entity to the given interface name.
   547         """return an adapter the entity to the given interface name.
   550 
   548