diff --git a/patchwork/api/patch.py b/patchwork/api/patch.py index 71ff0bbf..f850dcfc 100644 --- a/patchwork/api/patch.py +++ b/patchwork/api/patch.py @@ -410,6 +410,7 @@ def get_queryset(self): 'project', 'series__project', 'related__patches__project', + 'patchreviewintention_set__user', ) .select_related('state', 'submitter', 'series') .defer('content', 'diff', 'headers') diff --git a/patchwork/tests/api/test_patch.py b/patchwork/tests/api/test_patch.py index 4ca88749..8dbe741e 100644 --- a/patchwork/tests/api/test_patch.py +++ b/patchwork/tests/api/test_patch.py @@ -239,7 +239,7 @@ def test_list_bug_335(self): series = create_series() create_patches(5, series=series) - with self.assertNumQueries(5): + with self.assertNumQueries(6): self.client.get(self.api_url()) @utils.store_samples('patch-detail')