You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this use case, when using the m2m_fields configuration, I get N logs for each model registered with the connection tot custom tag. The log is correctly associated with the model the action occurred on, it just repeated N times.
This appears to happen because signal connection is made to the same m2m_model multiple times here --
* fix: use sender for m2m signal dispatch connection
This fix adds support for a use case where a single m2m through model is
used on multiple models. When the reciever is used for the dispatch uid
in this use case it cause duplicated logs because the through model
singal connection happens multiple times.
By changing the m2m signal connection to use the sender for the dispatch
uid this duplication is prevented because the signal connection only
happens once for the through model.
Refs: #685
* fix(format): apply black formatting
* add test and changelog entry
* remove unused import
* correct import sorting
* move change log message to correct section
I have a project using django-taggit that I'd like to add django-auditlog to.
In this project I'm using a custom tag model associated with numerous other models per django-taggit's documentation on how to use a custom tag.
For this use case, when using the
m2m_fields
configuration, I get N logs for each model registered with the connection tot custom tag. The log is correctly associated with the model the action occurred on, it just repeated N times.This appears to happen because signal connection is made to the same
m2m_model
multiple times here --django-auditlog/auditlog/registry.py
Lines 202 to 206 in d4f99c2
Repro repo: https://github.com/babybuddy/django-auditlog-685/
The text was updated successfully, but these errors were encountered: