From 69a06f7c577af1f170f71f78b28ec9089c6ad3b0 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Mon, 11 Mar 2024 22:19:51 +0200 Subject: [PATCH] Fix: add missing trash suffix when getting by id --- src/manage_sql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index 567d8ade6..d6c591334 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -5039,7 +5039,7 @@ init_get_iterator2_with (iterator_t* iterator, const char *type, init_iterator (iterator, "%sSELECT %s" " FROM %ss%s %s" - " WHERE %ss.id = %llu" + " WHERE %ss%s.id = %llu" " AND %s%s" "%s%s;", with_clause ? with_clause : "", @@ -5048,6 +5048,7 @@ init_get_iterator2_with (iterator_t* iterator, const char *type, type_trash_in_table (type) ? "" : "_trash", extra_tables ? extra_tables : "", type, + type_trash_in_table (type) ? "" : "_trash", resource, owned_clause, extra_where_single ? extra_where_single : "",