Browse Source

修复plan列表获取的bug

bigcat 2 năm trước cách đây
mục cha
commit
c6dbc5d641
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      apps/plan/views/planlistview.py

+ 2 - 1
apps/plan/views/planlistview.py

@@ -144,7 +144,7 @@ class PlanListView(APIView):
         if creator_id:
             plan_all = plan_all.filter(creator__id__contains=creator_id)
         if company_id:
-            plan_all = plan_all.filter(company__id__contains=company_id)
+            plan_all = plan_all.filter(company_id=company_id)
         """
         sort=update_time, -update_time, create_time, -create_time, title, -title, state
         """
@@ -170,5 +170,6 @@ class PlanListView(APIView):
                 'state': plan.state,
                 'create_time': plan.create_time,
                 'update_time': plan.update_time,
+                'company_id': plan.company_id,
             })
         return Response(info)