Fix filters with default order by ID (#78)

Closes #75

Signed-off-by: wkoot <3715211+wkoot@users.noreply.github.com>
Co-authored-by: mikedekker <mike@dekker.me>
This commit is contained in:
wkoot
2025-12-18 13:30:38 +01:00
committed by GitHub
co-authored by mikedekker
parent 9e87afcde7
commit 7ce718ff9d
4 changed files with 14 additions and 8 deletions
+4 -4
View File
@@ -27,24 +27,24 @@ class NetboxSLMRootView(APIRootView):
class SoftwareProductViewSet(NetBoxModelViewSet):
queryset = SoftwareProduct.objects.all()
queryset = SoftwareProduct.objects.all().order_by("id")
serializer_class = SoftwareProductSerializer
filterset_class = SoftwareProductFilterSet
class SoftwareProductVersionViewSet(NetBoxModelViewSet):
queryset = SoftwareProductVersion.objects.all()
queryset = SoftwareProductVersion.objects.all().order_by("id")
serializer_class = SoftwareProductVersionSerializer
filterset_class = SoftwareProductVersionFilterSet
class SoftwareProductInstallationViewSet(NetBoxModelViewSet):
queryset = SoftwareProductInstallation.objects.all()
queryset = SoftwareProductInstallation.objects.all().order_by("id")
serializer_class = SoftwareProductInstallationSerializer
filterset_class = SoftwareProductInstallationFilterSet
class SoftwareLicenseViewSet(NetBoxModelViewSet):
queryset = SoftwareLicense.objects.all()
queryset = SoftwareLicense.objects.all().order_by("id")
serializer_class = SoftwareLicenseSerializer
filterset_class = SoftwareLicenseFilterSet