fix: mlogb 取material bug
This commit is contained in:
parent
a6a3dcf33c
commit
427bf31d50
|
@ -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)]
|
||||
|
||||
|
|
Loading…
Reference in New Issue