主动报送任务

This commit is contained in:
caoqianming 2021-03-17 14:30:42 +08:00
parent e97a87684c
commit d335305971
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ class RecordViewSet(RbacFilterSet, PageOrNot, CreateUpdateCustomMixin, ModelView
contents = request.data['contents']
rlist = []
for i in contents:
data = {'content':i, 'belong_dept':request.user.dept, 'is_self':True}
data = {'content':Content.objects.get(pk=i), 'belong_dept':request.user.dept, 'is_self':True}
rlist.append(Record(**data))
Record.objects.bulk_create(rlist)
return Response(status=status.HTTP_200_OK)