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()