Persons API bug - duplicate entries returned
Think I discovered a possible bug in persons API - possibly other parts of the API are affected. Certain number of duplicated entries are returned, e.g. when searching for UK instructors at page 2 of results there are two entries for "m.wallis@leeds.ac.uk", on page 3 there are 2 entries for "m.croucher@sheffield.ac.uk", and so on.

See for example page 2 of results:
https://amy.software-carpentry.org/api/v1/persons/?country=GB&email=&family=&github=&is_instructor=true&may_contact=&middle=&order_by=&page=2&personal=&publish_profile=&username= 
diff --git a/api/views.py b/api/views.py
index b2f43520..3cd1d66f 100644
--- a/api/views.py
+++ b/api/views.py
@@ -736,7 +736,8 @@ class PersonViewSet(viewsets.ReadOnlyModelViewSet):
     """List many people or retrieve only one person."""
     permission_classes = (IsAuthenticated, IsAdmin)
     queryset = Person.objects.all().select_related('airport') \\
-                     .prefetch_related('badges', 'domains', 'lessons')
+                     .prefetch_related('badges', 'domains', 'lessons') \\
+                     .distinct()
     serializer_class = PersonSerializer
     pagination_class = StandardResultsSetPagination
     filterset_class = PersonFilter
['api/views.py']