fix: FtestWorkCreateUpdate 缺少count_sampling_ok

This commit is contained in:
caoqianming 2024-09-04 10:22:38 +08:00
parent 233591728a
commit 9ca66782b9
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class QuaStatUpdateSerializer(CustomModelSerializer):
class FtestWorkCreateUpdateSerializer(CustomModelSerializer):
class Meta:
model = FtestWork
fields = ['id', 'wm', 'mb', 'type', 'type2', 'test_date', 'count', 'count_sampling', 'count_ok', 'count_notok', 'count_notok_json', 'test_user', 'need_update_wm']
fields = ['id', 'wm', 'mb', 'type', 'type2', 'test_date', 'count', 'count_sampling', 'count_sampling_ok', 'count_ok', 'count_notok', 'count_notok_json', 'test_user', 'need_update_wm']
extra_kwargs = {'test_user': {'required': True}, 'type': {'required': True}}
def validate(self, attrs):
@ -104,6 +104,7 @@ class FtestWorkSerializer(CustomModelSerializer):
source='material', read_only=True)
material_cate = serializers.CharField(source='material.cate', read_only=True)
mb_ = MaterialBatchDetailSerializer(source='mb', read_only=True)
test_user_name = serializers.CharField(source='test_user.name', read_only=True)
class Meta:
model = FtestWork