jazzband / django-auditlog

A Django app that keeps a log of changes made to an object.
MIT License
1.09k stars 405 forks source link

pre_log and post_log signals not sent on m2m changes. #628

Open gghildyal opened 3 months ago

gghildyal commented 3 months ago

Usually when creating a model object, first the model is created with non-m2m fields and then m2m fields are set on the model to save it. The first operator creates a LogEntry object and sends a pre_log and post_log signals as expected. On receiving m2m_changed signal, a LogEntry is created for the change but a pre_log or post_log signal isn't sent.

gghildyal commented 3 months ago

This was found in 3.0.b4.

hramezani commented 2 months ago

Thanks @gghildyal for reporting this.

Yeah, django-auditlog has pre_log and post_log signals but it doesn't send them in m2m_changed.

It would be good to send these signals there.