Przeglądaj źródła

fix(backend): default empty strings for optional month template codes

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu 2 miesięcy temu
rodzic
commit
08f3b76e24
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      backend/app/models/qc_material.py

+ 2 - 2
backend/app/models/qc_material.py

@@ -32,8 +32,8 @@ class BizQcMaterialMonthTemplate(Base):
 
     id = Column(String(64), primary_key=True, comment="主键ID")
     material_id = Column(String(64), nullable=True, comment="关联物料ID")
-    material_code = Column(String(64), nullable=False, comment="物料编码")
-    material_name = Column(String(200), nullable=False, comment="物料名称")
+    material_code = Column(String(64), nullable=False, default="", comment="物料编码")
+    material_name = Column(String(200), nullable=False, default="", comment="物料名称")
     spec_model = Column(String(200), nullable=True, comment="规格型号")
     unit = Column(String(32), nullable=True, comment="单位")
     catalog_no = Column(String(128), nullable=True, comment="货号")