feat: notok option 其他
This commit is contained in:
parent
bfad89bf2f
commit
bbac19c791
|
@ -52,7 +52,7 @@ class NotOkOption(models.TextChoices):
|
|||
txd = "txd", _("同心度")
|
||||
hd = "hd", _("厚度")
|
||||
|
||||
wz = "wz", _("未知")
|
||||
qt = "qt", _("其它")
|
||||
|
||||
FTEST_TYPE_CHOICES = (
|
||||
('first', '首件检验'),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue