Skip to content
New issue

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

Related object history example doesn't work #655

Open
alxvallejo opened this issue Jul 1, 2024 · 0 comments
Open

Related object history example doesn't work #655

alxvallejo opened this issue Jul 1, 2024 · 0 comments

Comments

@alxvallejo
Copy link

From the documentation here: https://django-auditlog.readthedocs.io/en/latest/usage.html

obj = MyModel.objects.first()
rel_history = LogEntry.objects.get_for_objects(obj.related.all())
full_history = (obj.history.all() | rel_history.all()).order_by('-timestamp')

This gives me: "'QuerySet' object has no attribute 'get_for_objects'"

And then when I do something like this:

LogEntryManager.get_for_objects(MyRelatedModel.objects.filter(parent=parent).all())

I get: "LogEntryManager.get_for_objects() missing 1 required positional argument: 'queryset'"

So what gives?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant