Open moises-perez-tfs opened 10 months ago
Thanks @moises-perez-tfs for reporting this.
We are preparing auditlog
for V3
major release. and it's in beta.
Could you please try to install django-auditlog
from master
branch and see if you can reproduce the problem in master
?
Also, it would be great if you provide more information like a failing test.
LogEntry.changes_str
is not able to handle the dictionary obtained when using Many-to-Many (m2m) fields. It expects the values part to always be a list. When using m2m fields values is a dictionary in the form of{'type': 'm2m', 'operation': 'some_action', 'objects': [...]}
.The error raised is an
KeyError
when trying to accessvalues[0]
in line https://github.com/jazzband/django-auditlog/blob/9e987169da37930092417c35f5a7ae1ae11ca623/auditlog/models.py#L416C21-L416C30