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)]