mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-16 22:09:27 +08:00
Order by id available equipments
This commit is contained in:
parent
c61f978c75
commit
8e43e06ec2
1 changed files with 2 additions and 1 deletions
|
@ -103,7 +103,8 @@ class AvailableEquipmentInstanceViewSet(generics.ListAPIView):
|
|||
|
||||
# Get all equipment instances which are not associated with non-finalized transactions
|
||||
queryset = EquipmentInstance.objects.exclude(
|
||||
id__in=non_finalized_equipments.values_list('id', flat=True)
|
||||
id__in=non_finalized_equipments.values_list(
|
||||
'id', flat=True).order_by('id')
|
||||
)
|
||||
cache.set(key, queryset, timeout=60*60*24)
|
||||
|
||||
|
|
Loading…
Reference in a new issue