feat: 校验改版时选择的改版物料

This commit is contained in:
caoqianming 2025-11-17 08:51:55 +08:00
parent 6d030e2c06
commit e7ebdb0e8e
1 changed files with 3 additions and 1 deletions

View File

@ -1195,7 +1195,9 @@ class HandoverSerializer(CustomModelSerializer):
if attrs["type"] == Handover.H_CHANGE: if attrs["type"] == Handover.H_CHANGE:
attrs["mtype"] = Handover.H_MERGE attrs["mtype"] = Handover.H_MERGE
if "material_changed" not in attrs: if "material_changed" in attrs and attrs["material_changed"]:
pass
else:
raise ParseError("必须指定改版后的物料") raise ParseError("必须指定改版后的物料")
mtype = attrs["mtype"] mtype = attrs["mtype"]