From 6d1599d72d9b9b18596a37384bdd2f6a751e52e4 Mon Sep 17 00:00:00 2001 From: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com> Date: Thu, 9 Sep 2021 19:54:05 -0400 Subject: [PATCH] fix #6393 bug(nimbus): remove duplicates from owners drop down (#6398) Because * Whenever you filter by a related entity in django you'll always get duplicates in the results set so you have to add a .distinct() to the end of it This commit * Adds the necessary distinct filter to the owners queryset --- app/experimenter/experiments/api/v5/types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/experimenter/experiments/api/v5/types.py b/app/experimenter/experiments/api/v5/types.py index 7be0c436f..94dca4e65 100644 --- a/app/experimenter/experiments/api/v5/types.py +++ b/app/experimenter/experiments/api/v5/types.py @@ -234,6 +234,7 @@ class NimbusConfigurationType(graphene.ObjectType): return ( get_user_model() .objects.filter(owned_nimbusexperiments__isnull=False) + .distinct() .order_by("email") )