|
@@ -170,6 +170,7 @@ class PcInfo(View):
|
|
|
return response.json(500)
|
|
|
|
|
|
def query(self, request_dict, response):
|
|
|
+ pc_name = request_dict.get('pc_name', None)
|
|
|
package = request_dict.get('package', None)
|
|
|
file_type = request_dict.get('file_type', None)
|
|
|
q = Pc_Info.objects.filter(file_type=file_type).filter(package=package)
|
|
@@ -180,7 +181,9 @@ class PcInfo(View):
|
|
|
queryset = Pc_Info.objects.filter(package=package)
|
|
|
elif file_type and package is None:
|
|
|
queryset = Pc_Info.objects.filter(file_type=file_type)
|
|
|
- else:
|
|
|
+ elif pc_name and file_type:
|
|
|
+ queryset = Pc_Info.objects.filter(pc_name=pc_name).filter(file_type=file_type)
|
|
|
+ elif file_type and package:
|
|
|
queryset = Pc_Info.objects.filter(file_type=file_type).filter(package=package)
|
|
|
count = queryset.count()
|
|
|
res = queryset
|