equal
deleted
inserted
replaced
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 |