Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def before_delete(f):
return Callback(f, '_before_delete')
def __init__(self, f, t):
self.t = []
if isinstance(f, Callback):
self.t += f.t
f = f.f
self.f = f
self.t.append(t)
self._inst_count_ = Callback._inst_count_
Callback._inst_count_ += 1
def after_delete(f):
return Callback(f, '_after_delete')
def before_update(f):
return Callback(f, '_before_update')
def after_update(f):
return Callback(f, '_after_update')
def after_insert(f):
return Callback(f, '_after_insert')
def before_insert(f):
return Callback(f, '_before_insert')
def __init__(self, f, t):
self.t = []
if isinstance(f, Callback):
self.t += f.t
f = f.f
self.f = f
self.t.append(t)
self._inst_count_ = Callback._inst_count_
Callback._inst_count_ += 1