diff --git a/simple_history/manager.py b/simple_history/manager.py index ca99a2cdd..48549561d 100644 --- a/simple_history/manager.py +++ b/simple_history/manager.py @@ -152,7 +152,7 @@ def get_queryset(self): self.through, self.instance ) return qs.filter( - id__in=through_qs.all().values_list(self._m2m_through_field_name, flat=True) + pk__in=through_qs.all().values_list(self._m2m_through_field_name, flat=True) )