From ac135b13860aef1af250512098ab3b6f19be96f6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 13 Dec 2021 09:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E6=A3=80=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/wpm/serializers.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hb_server/apps/wpm/serializers.py b/hb_server/apps/wpm/serializers.py index 74b9ba7..ca3da1d 100644 --- a/hb_server/apps/wpm/serializers.py +++ b/hb_server/apps/wpm/serializers.py @@ -291,15 +291,6 @@ class WpmTestRecordCreateSerializer(serializers.ModelSerializer): class Meta: model = TestRecord fields = ['form', 'record_data', 'is_testok', 'wproduct'] - - def validate(self, attrs): - wproduct = attrs['wproduct'] - if wproduct.act_state == WProduct.WPR_ACT_STATE_TORETEST: - if 'origin_test' in attrs and attrs['origin_test']: - pass - else: - raise exceptions.APIException('复检需提供原检测记录ID') - return super().validate(attrs) class WpmTestFormInitSerializer(serializers.Serializer): wproduct = serializers.PrimaryKeyRelatedField(queryset=WProduct.objects.all(), required=True)