批量删除所属公司2
This commit is contained in:
parent
818021df6e
commit
a6ae4bd004
|
|
@ -189,9 +189,10 @@ class CMAViewSet(RecordMixin, ModelViewSet):
|
|||
array = request.data.get('ids', [])
|
||||
sszx = request.data.get('sszx', None)
|
||||
if array:
|
||||
CMA.objects.filter(sszx__id=sszx).delete()
|
||||
elif sszx:
|
||||
CMA.objects.filter(pk__in=array).delete()
|
||||
|
||||
elif sszx:
|
||||
CMA.objects.filter(sszx=sszx).delete()
|
||||
return Response(status = status.HTTP_200_OK)
|
||||
|
||||
@action(methods=['post'], detail=False, url_path='import', url_name='cma_import', perms_map = {'post':'cma_import'})
|
||||
|
|
|
|||
Loading…
Reference in New Issue