From 54c7c65fe0695b3c51a5fe8dc0ee66a5c52e4081 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 29 Aug 2024 14:52:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A7=E5=87=BA=E7=89=A9=E4=B8=BA0?= =?UTF-8?q?=E6=97=B6=E8=B7=B3=E8=BF=87revert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 4840a932..f12122b7 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -339,6 +339,8 @@ def mlog_revert(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): for mo in m_outs_list: 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 lookup = {'batch': mo_batch, 'material': mo_ma, 'mgroup': None, 'notok_sign': notok_sign, 'state': wm_state} if stored_mgroup: