server/hook.py
changeset 3195 a6f1daddfe8a
parent 3090 8184bec7414d
child 3376 f5c69485381f
child 3394 51a25bdd7bdc
equal deleted inserted replaced
3185:bd0126d17e83 3195:a6f1daddfe8a
   164         self.event = event
   164         self.event = event
   165 
   165 
   166     def __call__(self):
   166     def __call__(self):
   167         if hasattr(self, 'call'):
   167         if hasattr(self, 'call'):
   168             warn('[3.6] %s: call is deprecated, implements __call__' % self.__class__,
   168             warn('[3.6] %s: call is deprecated, implements __call__' % self.__class__,
   169                  DeprecationWarning))
   169                  DeprecationWarning)
   170             if self.event.endswith('_relation'):
   170             if self.event.endswith('_relation'):
   171                 self.call(self._cw, self.eidfrom, self.rtype, self.eidto)
   171                 self.call(self._cw, self.eidfrom, self.rtype, self.eidto)
   172             elif 'delete' in self.event:
   172             elif 'delete' in self.event:
   173                 self.call(self._cw, self.entity.eid)
   173                 self.call(self._cw, self.entity.eid)
   174             elif self.event.startswith('server_'):
   174             elif self.event.startswith('server_'):