소스 검색

修复app端美丽乡村数据过滤条件

yf_yzl 3 년 전
부모
커밋
2a3a44074a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      smartfarming/views/counts_views.py

+ 1 - 1
smartfarming/views/counts_views.py

@@ -322,7 +322,7 @@ class KeDongOverAPIView(APIView):
     def post(self, request): 
         # 我的信息
         try:
-            country_count = CountryModel.objects.all().count()
+            country_count = CountryModel.objects.filter(is_delete=1).count()
             area = MongoBase.objects.all().first().base_area
             device = MongoDevice.objects.all().count()
             return Response({