feat: notok option 其他

This commit is contained in:
caoqianming 2024-08-13 14:47:26 +08:00
parent bfad89bf2f
commit bbac19c791
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class NotOkOption(models.TextChoices):
txd = "txd", _("同心度")
hd = "hd", _("厚度")
wz = "wz", _("未知")
qt = "qt", _("其它")
FTEST_TYPE_CHOICES = (
('first', '首件检验'),

View File

@ -179,7 +179,7 @@ class WMaterialSerializer(CustomModelSerializer):
notok_sign_name = serializers.SerializerMethodField()
def get_notok_sign_name(self, obj):
return getattr(NotOkOption, obj.notok_sign, NotOkOption.wz).label if obj.notok_sign else None
return getattr(NotOkOption, obj.notok_sign, NotOkOption.qt).label if obj.notok_sign else None
class Meta:
model = WMaterial