Skip to content
Snippets Groups Projects
Commit 087a9385 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: change default order for hosts in API

parent 5c5a4061
No related branches found
No related tags found
No related merge requests found
Pipeline #8161 passed
......@@ -898,7 +898,7 @@ class APILanguageViewSet(ActiveFilterMixin, viewsets.ModelViewSet):
list=extend_schema(summary="List all hosts."),
)
class APIHostViewSet(ActiveFilterMixin, viewsets.ModelViewSet):
queryset = Host.objects.all()
queryset = Host.objects.all().order_by("-is_active", "name")
serializer_class = HostSerializer
pagination_class = LimitOffsetPagination
filter_backends = [drf_filters.SearchFilter]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment