fix: add_mtaskb用错序列化器了3

This commit is contained in:
caoqianming 2024-09-04 17:31:51 +08:00
parent 4c57c6e9ee
commit fc855d2830
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ class MtaskViewSet(CustomModelViewSet):
if total != mtask.count:
raise ParseError('任务数量与分配数量不匹配')
for v in vdata:
Mtaskb.objects.get_or_create(mtask=mtask, handle_user=v['handle_user'], count=v['count'])
Mtaskb.objects.get_or_create(mtask=mtask, handle_user=v['handle_user'], defaults={"count": v['count']})
dobjs = Mtaskb.objects.filter(mtask=mtask).exclude(handle_user__in=userIds)
from apps.wpm.models import Mlog
if Mlog.objects.filter(mtaskb__in=dobjs).exists():