[PATCH v2 1/6] api: Prefetch Series.project

Andy Doan andy.doan at linaro.org
Wed Mar 15 02:40:48 AEDT 2017


On 03/07/2017 01:22 PM, Stephen Finucane wrote:
> 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>
> Cc: Andy Doan <andy.doan at linaro.org>

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):
>



More information about the Patchwork mailing list