From 91b5e4d46ad8ccf96466a05180e8e17cfeb9c252 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Fri, 20 Feb 2026 00:19:33 +0800 Subject: [PATCH] Fix get_entity_attributes query to use LEFT JOIN and sort_order --- backend/db_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/db_manager.py b/backend/db_manager.py index 0383c96..d90a7e5 100644 --- a/backend/db_manager.py +++ b/backend/db_manager.py @@ -767,8 +767,8 @@ class DatabaseManager: rows = conn.execute( """SELECT ea.*, at.name as template_name, at.type as template_type FROM entity_attributes ea - JOIN attribute_templates at ON ea.template_id = at.id - WHERE ea.entity_id = ? ORDER BY at.display_order""", + LEFT JOIN attribute_templates at ON ea.template_id = at.id + WHERE ea.entity_id = ? ORDER BY ea.created_at""", (entity_id,) ).fetchall() conn.close()