feat: 批量更新时after_bulk_update放在事务中处理
This commit is contained in:
parent
7fde7148bf
commit
9f8cf21bf1
|
@ -129,7 +129,7 @@ class BulkUpdateModelMixin(UpdateModelMixin):
|
||||||
raise ValidationError(err_dict)
|
raise ValidationError(err_dict)
|
||||||
self.perform_update(sr) # 用自带的更新,可能需要做其他操作
|
self.perform_update(sr) # 用自带的更新,可能需要做其他操作
|
||||||
objs.append(sr.data)
|
objs.append(sr.data)
|
||||||
self.after_bulk_update(objs)
|
self.after_bulk_update(objs)
|
||||||
else:
|
else:
|
||||||
raise ParseError('提交数据非列表')
|
raise ParseError('提交数据非列表')
|
||||||
return Response(objs)
|
return Response(objs)
|
||||||
|
|
Loading…
Reference in New Issue