aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorJoris2022-07-09 20:06:54 +0200
committerJoris2022-07-09 20:06:54 +0200
commit72061e8cefc03d12264c006dfd90cb1ee5310d3e (patch)
treed3c11c69de9cee12e1d736f76e69fda25d65c037 /src/db
parent79cde4e391395e7397fa5215797055a7e7ed88cd (diff)
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.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/payments.rs2
1 files changed, 1 insertions, 1 deletions
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;