fix: template

This commit is contained in:
root
2025-07-12 23:45:41 +08:00
parent d27a458f6b
commit d301fca72c
2 changed files with 289 additions and 1 deletions

View File

@@ -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,