From 4cc28b3583594f6a9b5ed5353431f7344e9be14d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 6 Jun 2025 16:39:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20cal=5Fmlog=5Fcount=5Ffrom=5Fmlogb=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0count=5Fok=5Ffull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 38e3d445..7e4f3fcc 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -624,6 +624,7 @@ def cal_mlog_count_from_mlogb(mlog: Mlog): "total_count_break_t": Sum('count_break_t'), "total_count_real": Sum('count_real'), "total_count_ok": Sum('count_ok'), + "total_count_ok_full": Sum('count_ok_full'), "total_count_notok": Sum('count_notok'), } f_names = [f.name for f in Mlogb._meta.fields if 'count_n_' in f.name] @@ -638,6 +639,7 @@ def cal_mlog_count_from_mlogb(mlog: Mlog): mlog.count_break_t = mlogb_summary['total_count_break_t'] or 0 mlog.count_real = mlogb_summary['total_count_real'] or 0 mlog.count_ok = mlogb_summary['total_count_ok'] or 0 + mlog.count_ok_full = mlogb_summary['total_count_ok_full'] or 0 mlog.count_notok = mlogb_summary['total_count_notok'] or 0 for f in f_names: setattr(mlog, f, mlogb_summary[f'total_{f}'] or 0)