diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 7a824ea6..b32a27c5 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -1078,7 +1078,7 @@ class HandoverSerializer(CustomModelSerializer): if not attrs.get('send_dept', None) and not attrs.get('send_mgroup', None): raise ParseError('必须指定送料车间或送料工段') - if attrs["type"] == Handover.H_NORMAL and attrs.get("recive_mgroup", None) == attrs.get("send_mgroup", None): + if attrs["mtype"] == Handover.H_NORMAL and attrs.get("recive_mgroup", None) == attrs.get("send_mgroup", None): raise ParseError('正常交接收料工段与送料工段不能相同') t_count = 0 tracking = attrs["material"].tracking