Return equipment and equipment instances sorted by id in ascending order

This commit is contained in:
Keannu Bernasol 2023-12-02 22:08:36 +08:00
parent b707199bc0
commit 2dbd9d2690

View file

@ -12,7 +12,7 @@ class EquipmentViewSet(viewsets.ModelViewSet):
if (not DEBUG):
permission_classes = [IsAuthenticated, IsTechnician]
serializer_class = serializers.EquipmentSerializer
queryset = Equipment.objects.all().order_by('-date_added')
queryset = Equipment.objects.all().order_by('id')
# For viewing all logs for all equipments
@ -54,7 +54,7 @@ class EquipmentInstanceViewSet(viewsets.ModelViewSet):
if (not DEBUG):
permission_classes = [IsAuthenticated, IsTechnician]
serializer_class = serializers.EquipmentInstanceSerializer
queryset = EquipmentInstance.objects.all().order_by('-date_added')
queryset = EquipmentInstance.objects.all().order_by('id')
# For viewing all equipment instance logs