have instances be filtered by ID in case of no filtering criteria passed in

and then switch from using order by ID as a fallback for all ordering and instead
just set instances ordering to ID as default to prevent
OrderedManyToMany fields ordering from being interrupted.
This commit is contained in:
Rebeccah
2022-03-16 17:28:23 -04:00
parent 27dc8caabd
commit 933956eccb
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -365,6 +365,7 @@ class InstanceList(ListAPIView):
model = models.Instance
serializer_class = serializers.InstanceSerializer
search_fields = ('hostname',)
ordering = ('id',)
class InstanceDetail(RetrieveUpdateAPIView):