From 427bf31d509295db8359c0a3cacfc6bbd0ad8afb Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 2 Jul 2024 12:09:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mlogb=20=E5=8F=96material=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index bcdeccc3..ba88dcb8 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -214,7 +214,7 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): into_wm_mgroup = material_out.process.into_wm_mgroup m_outs = Mlogb.objects.filter(mlog=mlog, material_out__isnull=False) if m_outs.exists(): - m_outs_list = [(mo.material, mo.batch if mo.batch else mlog.batch, mo.count_ok, mlog.count_real_eweight) for mo in m_outs.all()] + m_outs_list = [(mo.material_out, mo.batch if mo.batch else mlog.batch, mo.count_ok, mlog.count_real_eweight) for mo in m_outs.all()] else: m_outs_list = [(material_out, mlog.batch, mlog.count_ok, mlog.count_real_eweight)] @@ -271,7 +271,7 @@ def mlog_revert(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): into_wm_mgroup = material_out.process.into_wm_mgroup m_outs = Mlogb.objects.filter(mlog=mlog, material_out__isnull=False) if m_outs.exists(): - m_outs_list = [(mo.material, mo.batch if mo.batch else mlog.batch, mo.count_ok, mlog.count_real_eweight) for mo in m_outs.all()] + m_outs_list = [(mo.material_out, mo.batch if mo.batch else mlog.batch, mo.count_ok, mlog.count_real_eweight) for mo in m_outs.all()] else: m_outs_list = [(material_out, mlog.batch, mlog.count_ok, mlog.count_real_eweight)]