From 31e8b92d294886ec8fc49fac81c7b749858e46ef Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 28 Feb 2025 15:50:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlogbin=20create=E6=97=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86qct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 2 +- apps/wpm/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 8e428df9..633aa545 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -701,7 +701,7 @@ class MlogbOutUpdateSerializer(CustomModelSerializer): model = Mlogb fields = "__all__" read_only_fields = EXCLUDE_FIELDS_BASE + ['mlog', 'mtask', 'wm_in', 'material_in', 'material_out', - 'count_use', 'count_break', 'count_pn_jgqbl', 'mlogbdefect'] + 'count_use', 'count_break', 'count_pn_jgqbl', 'mlogbdefect', "qct"] def create(self, validated_data): material_out:Material = validated_data["material_out"] diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 7c76c189..da095ae8 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -595,7 +595,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust if is_fix and mgroup.process.type == Process.PRO_PROD: # 如果是生产返修,则忽略质检 pass - elif mlogbout.qct: + elif mlogbout.qct is None: try: qctmat = QctMat.objects.get(material=material_out, qct__is_deleted=False, qct__tags__contains="process").order_by("-create_time") except QctMat.DoesNotExist: