From 27ada7845ca27fedc85365ed2edf3cd5f1b8d854 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 14 Feb 2020 14:39:57 +0100 Subject: [PATCH] Fixed flaky test --- api/funkwhale_api/manage/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/funkwhale_api/manage/views.py b/api/funkwhale_api/manage/views.py index 77ad9f6a7..c84f9b3c0 100644 --- a/api/funkwhale_api/manage/views.py +++ b/api/funkwhale_api/manage/views.py @@ -384,8 +384,7 @@ class ManageDomainViewSet( ): lookup_value_regex = r"[a-zA-Z0-9\-\.]+" queryset = ( - federation_models.Domain.objects.external() - .with_actors_count() + federation_models.Domain.objects.with_actors_count() .with_outbox_activities_count() .prefetch_related("instance_policy") .order_by("name") @@ -402,6 +401,10 @@ class ManageDomainViewSet( "instance_policy", ] + def get_queryset(self, **kwargs): + queryset = super().get_queryset(**kwargs) + return queryset.external() + def get_serializer_class(self): if self.action in ["update", "partial_update"]: # A dedicated serializer for update