Fix get_attribute_history query to not use template_id column
This commit is contained in:
@@ -829,9 +829,8 @@ class DatabaseManager:
|
|||||||
where_clause = " AND ".join(conditions) if conditions else "1=1"
|
where_clause = " AND ".join(conditions) if conditions else "1=1"
|
||||||
|
|
||||||
rows = conn.execute(
|
rows = conn.execute(
|
||||||
f"""SELECT ah.*, at.name as template_name
|
f"""SELECT ah.*
|
||||||
FROM attribute_history ah
|
FROM attribute_history ah
|
||||||
JOIN attribute_templates at ON ah.template_id = at.id
|
|
||||||
WHERE {where_clause}
|
WHERE {where_clause}
|
||||||
ORDER BY ah.changed_at DESC LIMIT ?""",
|
ORDER BY ah.changed_at DESC LIMIT ?""",
|
||||||
params + [limit]
|
params + [limit]
|
||||||
|
|||||||
Reference in New Issue
Block a user