From b2521678adbaac2dd57c757f355848f8ff6daa81 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 23 Jun 2026 17:04:13 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20non-field=20keys=20in=20pricin?= =?UTF-8?q?g=20items=20skip=20instead=20of=20raise=20-=20aligns=20top-leve?= =?UTF-8?q?l=20loop=20(line=20618)=20with=20filters=20loop=20(line=20653)?= =?UTF-8?q?=20behavior=20-=20value=5Fmode=20and=20other=20control=20params?= =?UTF-8?q?=20at=20filter=20level=20no=20longer=20cause=20'fields=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=AE=9A=E4=B9=89'=20error"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6df2569c8ed9615c488d565fffa30883e819dce6. --- pricing/pricing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pricing/pricing.py b/pricing/pricing.py index 856cc08..ac5aa6e 100644 --- a/pricing/pricing.py +++ b/pricing/pricing.py @@ -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: