소스 검색

测报灯图片收集

yf_ymm 5 년 전
부모
커밋
ce4ac4b0a6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      apps/Equipment/views.py

+ 2 - 1
apps/Equipment/views.py

@@ -269,7 +269,8 @@ class Equip_Show_List(ListView):
 class Equip_Show_Detail(ListView):
     def get(self,request):
         e_id = request.GET.get("id")
-        product = Product.objects.get(id=e_id)
+        if e_id:
+            product = Product.objects.get(id=e_id)
         e_name = request.GET.get("name")
         if e_name:
             product = Product.objects.get(title=e_name)