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(
|
rows = conn.execute(
|
||||||
"""SELECT ea.*, at.name as template_name, at.type as template_type
|
"""SELECT ea.*, at.name as template_name, at.type as template_type
|
||||||
FROM entity_attributes ea
|
FROM entity_attributes ea
|
||||||
JOIN attribute_templates at ON ea.template_id = at.id
|
LEFT JOIN attribute_templates at ON ea.template_id = at.id
|
||||||
WHERE ea.entity_id = ? ORDER BY at.display_order""",
|
WHERE ea.entity_id = ? ORDER BY ea.created_at""",
|
||||||
(entity_id,)
|
(entity_id,)
|
||||||
).fetchall()
|
).fetchall()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user