From 526127b1e4b6e27d5c493ab5b355ce5de080eb6d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 20 Oct 2021 14:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E8=81=9A=E5=90=88=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/inm/models.py | 2 +- hb_server/apps/wf/views.py | 2 +- hb_server/apps/wpm/views.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/inm/models.py b/hb_server/apps/inm/models.py index 372e384..b48ae3d 100644 --- a/hb_server/apps/inm/models.py +++ b/hb_server/apps/inm/models.py @@ -65,5 +65,5 @@ class FIFODetail(CommonAModel): """ 领料详细记录 """ - + diff --git a/hb_server/apps/wf/views.py b/hb_server/apps/wf/views.py index a86e3f3..f2cc372 100644 --- a/hb_server/apps/wf/views.py +++ b/hb_server/apps/wf/views.py @@ -175,7 +175,7 @@ class TicketViewSet(OptimizationMixin, CreateUpdateCustomMixin, CreateModelMixin queryset = Ticket.objects.filter(participant__contains=request.user.id, is_deleted=False)\ .exclude(act_state__in=[Ticket.TICKET_ACT_STATE_FINISH, Ticket.TICKET_ACT_STATE_CLOSED]) ret['total_count'] = queryset.count() - ret['details'] = list(queryset.annotate(count = Count('workflow')).values('workflow', 'workflow__name', 'count')) + ret['details'] = list(queryset.values('workflow', 'workflow__name').annotate(count = Count('workflow'))) return Response(ret) @action(methods=['post'], detail=True, perms_map={'post':'*'}) diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index 1258ca9..bb46fb1 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -6,6 +6,8 @@ from apps.pum.serializers import VendorSerializer from apps.system.mixins import CreateUpdateModelAMixin, OptimizationMixin + + # Create your views here. class VendorViewSet(CreateUpdateModelAMixin, ModelViewSet): """