fix(计划): 通用步骤计划不再拿素材历史状态冒充本轮发布数
This commit is contained in:
@@ -2204,8 +2204,10 @@ def _finish_run(run_id, account, date, status, error="", serial="", device_name=
|
||||
"""
|
||||
from core.models import AeRun, db
|
||||
prof = merged(prof)
|
||||
items = items or _items_summary(account, date)
|
||||
totals = totals or _totals(items)
|
||||
# `None` = 没传(按素材表统计);显式传 [] 表示"这一轮不涉及素材"(通用任务计划),
|
||||
# 不能再用 `or` —— 那会把 [] 当成没传,又去素材表统计出误导性的已发布数。
|
||||
items = _items_summary(account, date) if items is None else items
|
||||
totals = _totals(items) if totals is None else totals
|
||||
accounts_for_log = [str(a).strip() for a in (log_accounts or [account] or [])
|
||||
if str(a).strip()]
|
||||
info = {"account": account, "date": date, "serial": serial, "device_name": device_name,
|
||||
|
||||
Reference in New Issue
Block a user