fix: template
This commit is contained in:
@@ -159,8 +159,12 @@ PostgreSQL 驱动 psycopg2 未安装。请安装:
|
||||
|
||||
now = datetime.now()
|
||||
|
||||
# 处理 draft_content,如果 template_info 有 draft_content 属性则使用,否则为空对象
|
||||
draft_content = getattr(template_info, 'draft_content', {})
|
||||
# 处理 draft_content
|
||||
draft_content = template_info.draft_content
|
||||
if draft_content is None:
|
||||
draft_content = {}
|
||||
|
||||
logger.debug(f"Storing draft_content for template {template_id}: {type(draft_content)} with {len(draft_content)} keys")
|
||||
|
||||
cursor.execute(insert_sql, (
|
||||
template_id,
|
||||
|
||||
Reference in New Issue
Block a user