mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
Return equipment and equipment instances sorted by id in ascending order
This commit is contained in:
parent
b707199bc0
commit
2dbd9d2690
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class EquipmentViewSet(viewsets.ModelViewSet):
|
||||||
if (not DEBUG):
|
if (not DEBUG):
|
||||||
permission_classes = [IsAuthenticated, IsTechnician]
|
permission_classes = [IsAuthenticated, IsTechnician]
|
||||||
serializer_class = serializers.EquipmentSerializer
|
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
|
# For viewing all logs for all equipments
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class EquipmentInstanceViewSet(viewsets.ModelViewSet):
|
||||||
if (not DEBUG):
|
if (not DEBUG):
|
||||||
permission_classes = [IsAuthenticated, IsTechnician]
|
permission_classes = [IsAuthenticated, IsTechnician]
|
||||||
serializer_class = serializers.EquipmentInstanceSerializer
|
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
|
# For viewing all equipment instance logs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue