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 commit is contained in:
parent
3a9e30313b
commit
6df2569c8e
@ -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', 'value_mode'}
|
||||
skip_keys = {'formula', 'price_factors', 'unit_prices', 'unit', 'min_amount', 'filters', 'pricing_type'}
|
||||
for k, spec_value in p.items():
|
||||
if spec_value is None:
|
||||
continue
|
||||
@ -617,9 +617,7 @@ order by b.enabled_date desc"""
|
||||
continue
|
||||
f = d.fields.get(k)
|
||||
if not f:
|
||||
e = f'定价项({i})中的{k}在fields中没有定义'
|
||||
exception(f'{e}')
|
||||
raise Exception(e)
|
||||
continue # 非字段key(如value_mode等控制参数),跳过
|
||||
data_value = config_data.get(k)
|
||||
data_value = data_mapping(d, k, data_value)
|
||||
if data_value is None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user