[PATCH v3 1/5] REST: Prefetch Series.project
Stephen Finucane
stephen at that.guru
Fri Mar 17 09:07:24 AEDT 2017
I missed this when testing due to only having a single project. There
will be performance issues on instances using multiple projects.
Signed-off-by: Stephen Finucane <stephen at that.guru>
Reviewed-by: Andy Doan <andy.doan at linaro.org>
---
patchwork/api/series.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patchwork/api/series.py b/patchwork/api/series.py
index f66f0d2..3d5847b 100644
--- a/patchwork/api/series.py
+++ b/patchwork/api/series.py
@@ -51,7 +51,7 @@ class SeriesMixin(object):
def get_queryset(self):
return Series.objects.all().prefetch_related('patches',)\
- .select_related('submitter', 'cover_letter')
+ .select_related('submitter', 'cover_letter', 'project')
class SeriesList(SeriesMixin, ListAPIView):
--
2.9.3
More information about the Patchwork
mailing list