Prechádzať zdrojové kódy

Merge remote-tracking branch 'remotes/origin/bin' into dev

Ansjer 4 rokov pred
rodič
commit
c1099b581c
1 zmenil súbory, kde vykonal 5 pridanie a 8 odobranie
  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)