fix: template
This commit is contained in:
@@ -152,10 +152,15 @@ def get_template_detail(
|
||||
|
||||
# 获取 draft_content
|
||||
draft_content = template_table.get_draft_content(template_id)
|
||||
if not draft_content:
|
||||
if draft_content is None:
|
||||
response.error(-32603, f"模板详细信息不存在: {template_id}")
|
||||
return
|
||||
|
||||
# 确保 draft_content 是字典类型
|
||||
if not isinstance(draft_content, dict):
|
||||
logger.warning(f"draft_content is not a dict for template {template_id}: {type(draft_content)}")
|
||||
draft_content = {}
|
||||
|
||||
# 构建详细信息
|
||||
detail = {
|
||||
'id': template.id,
|
||||
|
||||
Reference in New Issue
Block a user