fix: is_fix 日志不再继承输入物料的缺陷标识

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
caoqianming 2026-04-30 09:09:30 +08:00
parent 881e16626d
commit d2581d8500
1 changed files with 2 additions and 0 deletions

View File

@ -538,6 +538,8 @@ class Mlogb(BaseModel):
def get_default_inherited_defect(self):
if self.material_out is None or self.material_out.tracking != Material.MA_TRACKING_BATCH:
return None
if self.mlog_id and self.mlog and self.mlog.is_fix:
return None
if self.mlogb_from_id and self.mlogb_from and self.mlogb_from.wm_in_id:
return self.mlogb_from.wm_in.defect
if self.wm_in_id and self.wm_in: