lhq 4 жил өмнө
parent
commit
3e47a0760c
1 өөрчлөгдсөн 5 нэмэгдсэн , 8 устгасан
  1. 5 8
      Controller/PcInfo.py

+ 5 - 8
Controller/PcInfo.py

@@ -174,14 +174,11 @@ class PcInfo(View):
             queryset = Pc_Info.objects.all()
         else:
             queryset = Pc_Info.objects.filter(pc_name=pc_name)
-        if queryset.exists():
-            count = queryset.count()
-            res = queryset
-            send_json = CommonService.qs_to_dict(res)
-            send_json['count'] = count
-            return response.json(0, send_json)
-        else:
-            return response.json(173)
+        count = queryset.count()
+        res = queryset
+        send_json = CommonService.qs_to_dict(res)
+        send_json['count'] = count
+        return response.json(0, send_json)
 
     def queryall(self, request_dict, response):
         token = request_dict.get('token', None)