From 9fb09f7c2ac7e83d49cec023282254530913bb3a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 14 Nov 2024 11:24:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mlog=20submit=20=E5=85=B3=E4=BA=8Ecount?= =?UTF-8?q?=5Fn=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 6383dd92..756999c1 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -195,7 +195,7 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): for f in Mlogb._meta.fields: if 'count_n_' in f.name and getattr(item, f.name) > 0: notok_sign = f.name.replace('count_n_', '') - m_outs_list.append( (item.material_out, item.batch if item.batch else mlog.batch, getattr(item, f.name), mlog.count_real_eweight, notok_sign)) + m_outs_list.append( (item.material_out, item.batch if item.batch else mlog.batch, getattr(item, f.name), mlog.count_real_eweight, notok_sign, item)) stored_notok = True else: m_outs_list = [(material_out, mlog.batch, mlog.count_ok, mlog.count_real_eweight, None, mlog)]