aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-02-21 11:21:11 -0500
committerStephen Finucane <stephen@that.guru>2017-03-20 18:23:25 +0000
commit54bad028f6d9768e7e40d735737cf83bd15eafea (patch)
tree7b39463108bc41e2a9295fc8aff61663908fb6cd
parent8f00d8a8de06845a1e9e6e8ccae3158e2aff8d79 (diff)
downloadpatchwork-54bad028f6d9768e7e40d735737cf83bd15eafea.tar
patchwork-54bad028f6d9768e7e40d735737cf83bd15eafea.tar.gz
REST: Prefetch Series.project
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@that.guru> Reviewed-by: Andy Doan <andy.doan@linaro.org>
-rw-r--r--patchwork/api/series.py2
1 files changed, 1 insertions, 1 deletions
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):