Django 1.10 prohibits non-relational fields for nested relations [1]. Replace said call with a functional alternative.
[1] https://docs.djangoproject.com/en/dev/releases/1.10/#select-related-prohibits-non-relational-fields-for-nested-relations Signed-off-by: Stephen Finucane <step...@that.guru> --- patchwork/views/rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/views/rest_api.py b/patchwork/views/rest_api.py index d412587..9c58669 100644 --- a/patchwork/views/rest_api.py +++ b/patchwork/views/rest_api.py @@ -94,7 +94,7 @@ class PeopleViewSet(PatchworkViewSet): def get_queryset(self): qs = super(PeopleViewSet, self).get_queryset() - return qs.select_related('user__username') + return qs.prefetch_related('user') class ProjectViewSet(PatchworkViewSet): -- 2.7.4 _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork