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