diff --git a/apps/authentication/api/temp_token.py b/apps/authentication/api/temp_token.py index 98c1d74d6..a8fcc02af 100644 --- a/apps/authentication/api/temp_token.py +++ b/apps/authentication/api/temp_token.py @@ -15,7 +15,7 @@ class TempTokenViewSet(JMSModelViewSet): def get_queryset(self): username = self.request.user.username - return TempToken.objects.filter(username=username) + return TempToken.objects.filter(username=username).order_by('-date_created') @action(methods=['PATCH'], detail=True, url_path='expire') def expire(self, *args, **kwargs): @@ -24,4 +24,3 @@ class TempTokenViewSet(JMSModelViewSet): instance.save() serializer = self.get_serializer(instance) return Response(serializer.data) -