sobjects/supervising.py
branchstable
changeset 2195 58bef4f707ce
parent 2102 268659907769
child 2234 1fbcf202882d
equal deleted inserted replaced
2194:c8c8ef5c5c65 2195:58bef4f707ce
    46 
    46 
    47 class EntityDeleteHook(SomethingChangedHook):
    47 class EntityDeleteHook(SomethingChangedHook):
    48     events = ('before_delete_entity',)
    48     events = ('before_delete_entity',)
    49 
    49 
    50     def _call(self, eid):
    50     def _call(self, eid):
    51         entity = self.session.entity(eid)
    51         entity = self.session.entity_from_eid(eid)
    52         try:
    52         try:
    53             title = entity.dc_title()
    53             title = entity.dc_title()
    54         except:
    54         except:
    55             # may raise an error during deletion process, for instance due to
    55             # may raise an error during deletion process, for instance due to
    56             # missing required relation
    56             # missing required relation