From a3e782d3657451172d5bead0ce3ec20e99aef77d Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Fri, 20 Feb 2026 00:20:14 +0800 Subject: [PATCH] Fix EntityAttribute dataclass to include name, type, and options fields --- backend/db_manager.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/db_manager.py b/backend/db_manager.py index d90a7e5..38ffcc2 100644 --- a/backend/db_manager.py +++ b/backend/db_manager.py @@ -67,12 +67,19 @@ class EntityAttribute: """实体属性值""" id: str entity_id: str - template_id: str - value: str + template_id: Optional[str] = None + name: str = "" # 属性名称 + type: str = "text" # 属性类型 + value: str = "" + options: List[str] = None # 选项列表 template_name: str = "" # 关联查询时填充 template_type: str = "" # 关联查询时填充 created_at: str = "" updated_at: str = "" + + def __post_init__(self): + if self.options is None: + self.options = [] @dataclass class AttributeHistory: