Fix get_entity_attributes query to use LEFT JOIN and sort_order
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user