mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
Fix issue with possible duplicates in get_for_objects method
This commit is contained in:
parent
3623812ab4
commit
1173d3bc91
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ class LogEntryManager(models.Manager):
|
|||
content_type = ContentType.objects.get_for_model(queryset.model)
|
||||
primary_keys = queryset.values_list(queryset.model._meta.pk.name, flat=True)
|
||||
|
||||
return self.filter(content_type=content_type).filter(Q(object_id__in=primary_keys) | Q(object_pk__in=primary_keys))
|
||||
return self.filter(content_type=content_type).filter(Q(object_id__in=primary_keys) | Q(object_pk__in=primary_keys)).distinct()
|
||||
|
||||
def get_for_model(self, model):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue