feat: 产出物为0时跳过revert
This commit is contained in:
parent
81a90f31cd
commit
54c7c65fe0
|
@ -339,6 +339,8 @@ def mlog_revert(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
|
||||||
|
|
||||||
for mo in m_outs_list:
|
for mo in m_outs_list:
|
||||||
mo_ma, mo_batch, mo_count, _, notok_sign = mo
|
mo_ma, mo_batch, mo_count, _, notok_sign = mo
|
||||||
|
if mo_count == 0:
|
||||||
|
continue
|
||||||
wm_state = WMaterial.WM_OK if notok_sign is None else WMaterial.WM_NOTOK
|
wm_state = WMaterial.WM_OK if notok_sign is None else WMaterial.WM_NOTOK
|
||||||
lookup = {'batch': mo_batch, 'material': mo_ma, 'mgroup': None, 'notok_sign': notok_sign, 'state': wm_state}
|
lookup = {'batch': mo_batch, 'material': mo_ma, 'mgroup': None, 'notok_sign': notok_sign, 'state': wm_state}
|
||||||
if stored_mgroup:
|
if stored_mgroup:
|
||||||
|
|
Loading…
Reference in New Issue