Skip to content

fix(hooks/notification): correctly initialize operation with event attribute

Also in the context of #260 (closed) but I'm less confident here.

It turns out that notification operation were created without any event attribute during postcreate but maybe also in other situations (but we don't know those one). Turns out it's because the notify_on_commit function didn't pass down the event attribute to the operation __init__ (hidden in .get_instance) which didn't explicitly ask for it because we have **kwargs and self.__dict__.update(kwargs) everywhere.

I'm not 100% confident about this modification but it does fix the situation described in #260 (closed).

Merge request reports