fix: cal_mlog_count_from_mlogb 统计bug
This commit is contained in:
parent
9fee0b52d5
commit
044819815e
|
|
@ -433,7 +433,7 @@ def cal_mlog_count_from_mlogb(mlog: Mlog):
|
||||||
"total_count_ok": Sum('count_ok'),
|
"total_count_ok": Sum('count_ok'),
|
||||||
"total_count_notok": Sum('count_notok'),
|
"total_count_notok": Sum('count_notok'),
|
||||||
}
|
}
|
||||||
f_names = [f.name for f in Mlogb._meta.fields if 'count_n' in f.name]
|
f_names = [f.name for f in Mlogb._meta.fields if 'count_n_' in f.name]
|
||||||
for f in f_names:
|
for f in f_names:
|
||||||
a_dict[f'total_{f}'] = Sum(f)
|
a_dict[f'total_{f}'] = Sum(f)
|
||||||
mlogb_summary = Mlogb.objects.filter(mlog=mlog).aggregate(
|
mlogb_summary = Mlogb.objects.filter(mlog=mlog).aggregate(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue