From d99eeb7ec12e6a8c20a70d9771d1c309e705342d Mon Sep 17 00:00:00 2001 From: Richard Tan Date: Wed, 11 Apr 2018 15:51:29 -0700 Subject: [PATCH] Added order_by explicitly --- backend/api/viewsets/CreditTrade.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/viewsets/CreditTrade.py b/backend/api/viewsets/CreditTrade.py index a4276d0e5..c1c4cc5f4 100644 --- a/backend/api/viewsets/CreditTrade.py +++ b/backend/api/viewsets/CreditTrade.py @@ -105,7 +105,7 @@ def list_approved(self, request): .get(status="Approved") credit_trades = CreditTrade.objects.filter( - status_id=status_approved.id) + status_id=status_approved.id).order_by('id') serializer = self.get_serializer(credit_trades, many=True) return Response(serializer.data) @@ -116,7 +116,7 @@ def batch_process(self, request): .get(status="Approved") credit_trades = CreditTrade.objects.filter( - status_id=status_approved.id) + status_id=status_approved.id).order_by('id') CreditTradeService.validate_credits(credit_trades)