From 7a281d0822e7791ddc4a24e2e6e274448e630f39 Mon Sep 17 00:00:00 2001 From: Marco Sirabella Date: Wed, 9 Aug 2023 14:16:47 -0700 Subject: [PATCH] id__in -> pk__in --- simple_history/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) )