From 72061e8cefc03d12264c006dfd90cb1ee5310d3e Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 9 Jul 2022 20:06:54 +0200 Subject: Fix payment search by sub word It tried to search for exact words, minus accents and case. Use the same method that was successfully working when searching a category. --- src/db/payments.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/db') diff --git a/src/db/payments.rs b/src/db/payments.rs index f20dbdc..0082736 100644 --- a/src/db/payments.rs +++ b/src/db/payments.rs @@ -484,7 +484,7 @@ ORDER BY ); let res = sqlx::query(&query) - .bind(text::format_search(&format!("%{}%", payment_name))) + .bind(text::format_search(&payment_name)) .map(|row: SqliteRow| row.get("category_id")) .fetch_one(pool) .await; -- cgit v1.2.3