Преглед на файлове

更新物联网卡排序

yf_fyh преди 2 години
родител
ревизия
0ea4b4becf
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      apps/IOTCard/views.py

+ 1 - 1
apps/IOTCard/views.py

@@ -33,7 +33,7 @@ def time_dif(checkdatetime):
 class PlatformIOTCardViewSet(viewsets.ModelViewSet):
     serializer_class = PlatSimInfoSerializer
     pagination_class = CustomPagination
-    queryset = PlatSimInfo.objects.all().order_by("-expiry_date")
+    queryset = PlatSimInfo.objects.all().order_by("-id")
 
     def list(self, request, *args, **kwargs):
         device_type = request.query_params.get("device_type")