We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using MyModel.many2many_field.clear(), changes json looks like
MyModel.many2many_field.clear()
{'many2many_field': {'type': 'm2m', 'operation': 'delete', 'objects': ['object1', 'object2', ... , 'object999999']}}
This can make changes field extremely big.
Maybe instead
if action == "post_clear": changed_queryset = kwargs["model"].objects.all()
you should use
if action == "pre_clear": changed_queryset = getattr(kwargs["model"], field_name).all()
in make_log_m2m_changes reciever.
Or alternatively just set operation to "clear" with empty objects list.
The text was updated successfully, but these errors were encountered:
Thanks @redieroglif for reporting this.
Another option would be to limit the objects to the first 10 or 20.
I think we can define a config with the default value of None. Then the user can limit it by changing the config value.
None
We can name the config AUDITLOG_M2M_LOG_OBJECTS_COUNT or whatever you prefer
AUDITLOG_M2M_LOG_OBJECTS_COUNT
Sorry, something went wrong.
Fix logging all instances of M2M model
cd0518a
See issue: jazzband#539
Successfully merging a pull request may close this issue.
When using
MyModel.many2many_field.clear()
, changes json looks likeThis can make changes field extremely big.
Maybe instead
you should use
in make_log_m2m_changes reciever.
Or alternatively just set operation to "clear" with empty objects list.
The text was updated successfully, but these errors were encountered: