Revert "fix: non-field keys in pricing items skip instead of raise - aligns top-level loop (line 618) with filters loop (line 653) behavior - value_mode and other control params at filter level no longer cause 'fields中没有定义' error"

This reverts commit 6df2569c8ed9615c488d565fffa30883e819dce6.
This commit is contained in:
Hermes Agent 2026-06-23 17:04:13 +08:00
parent 03a0bea51f
commit b2521678ad

View File

@ -609,7 +609,7 @@ order by b.enabled_date desc"""
ns = DictObject(**config_data)
# 检查过滤条件(排除定价计算字段)
skip_keys = {'formula', 'price_factors', 'unit_prices', 'unit', 'min_amount', 'filters', 'pricing_type'}
skip_keys = {'formula', 'price_factors', 'unit_prices', 'unit', 'min_amount', 'filters', 'pricing_type', 'value_mode'}
for k, spec_value in p.items():
if spec_value is None:
continue
@ -617,7 +617,9 @@ order by b.enabled_date desc"""
continue
f = d.fields.get(k)
if not f:
continue # 非字段key如value_mode等控制参数跳过
e = f'定价项({i})中的{k}在fields中没有定义'
exception(f'{e}')
raise Exception(e)
data_value = config_data.get(k)
data_value = data_mapping(d, k, data_value)
if data_value is None: