feat: mlogb_summary选用need_inout为True的数据

This commit is contained in:
caoqianming 2025-05-15 15:35:03 +08:00
parent 0057e4c181
commit 156f6b4844
1 changed files with 1 additions and 1 deletions

View File

@ -626,7 +626,7 @@ def cal_mlog_count_from_mlogb(mlog: Mlog):
f_names = [f.name for f in Mlogb._meta.fields if 'count_n_' in f.name]
for f in f_names:
a_dict[f'total_{f}'] = Sum(f)
mlogb_summary = Mlogb.objects.filter(mlog=mlog).aggregate(
mlogb_summary = Mlogb.objects.filter(mlog=mlog, need_inout=True).aggregate(
**a_dict
)
# 更新Mlog对象的相应字段