fix: 我的任务2修改
This commit is contained in:
parent
59630d8c51
commit
e2126ff0b7
|
|
@ -544,15 +544,9 @@ class Task2DoViewSet(ListModelMixin, DestroyModelMixin, GenericViewSet):
|
|||
|
||||
我的任务
|
||||
"""
|
||||
queryset = Task2Do.objects.exclude(task2__state=10).order_by('-create_time')
|
||||
query_params = self.request.query_params
|
||||
belong_dept = query_params.pop('belong_dept', None)
|
||||
if belong_dept:
|
||||
queryset = queryset.filter(belong_dept=belong_dept)
|
||||
else:
|
||||
mydept = request.user.dept
|
||||
belong_depts = get_child_queryset2(mydept)
|
||||
queryset = queryset.filter(belong_dept__in = belong_depts)
|
||||
queryset = Task2Do.objects.filter(belong_dept__in = belong_depts).exclude(task2__state=10).order_by('-create_time')
|
||||
queryset = self.filter_queryset(queryset)
|
||||
page = self.paginate_queryset(queryset)
|
||||
if page is not None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue