fix: 获取可交接到的工段进行去重

This commit is contained in:
caoqianming 2025-02-08 09:45:05 +08:00
parent 2843905def
commit 5b7b1bf276
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ class HandoverViewSet(CustomModelViewSet):
)
elif type in [Handover.H_SCRAP]:
m_qs = m_qs.filter(process=None)
return Response(list(m_qs.values('id', 'name')))
return Response(list(m_qs.values('id', 'name').distinct()))
@action(methods=['post'], detail=False, perms_map={'post': 'handover.create'}, serializer_class=GenHandoverWmSerializer)
@transaction.atomic