fix: dspy f-string不能含反斜杠,改用%格式化
This commit is contained in:
parent
f8717ca9a8
commit
876e4581b7
@ -4,8 +4,11 @@ try:
|
||||
category_id = params_kw.get('category_id', '')
|
||||
# Debug: log incoming params to help diagnose tree selection issue
|
||||
from appPublic.log import debug
|
||||
body_preview = 'none'
|
||||
raw_body = getattr(request, 'body', b'')
|
||||
debug(f'[import_category] params_kw={dict(params_kw)}, category_id={category_id}, body={raw_body[:200] if raw_body else \"none\"}')
|
||||
if raw_body:
|
||||
body_preview = str(raw_body[:200])
|
||||
debug('[import_category] params_kw=%s, category_id=%s, body=%s' % (dict(params_kw), category_id, body_preview))
|
||||
|
||||
if not category_id:
|
||||
raise ValueError('请先选择一个产品类别')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user