feat: attrs["count"] = len(attrs["handoverb"])
This commit is contained in:
parent
71b67b7210
commit
31ef257a60
|
@ -970,6 +970,9 @@ class HandoverSerializer(CustomModelSerializer):
|
|||
recive_mgroup = attrs.get("recive_mgroup", None)
|
||||
if recive_mgroup is None:
|
||||
raise ParseError('返工交接需指定工段')
|
||||
material:Material = attrs["material"]
|
||||
if material.tracking == Material.MA_TRACKING_SINGLE:
|
||||
attrs["count"] = len(attrs["handoverb"])
|
||||
return attrs
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue