From cc0aae170a8d0eeb87195b58ee2fb3b1b89fbbb7 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 6 Jun 2017 18:47:04 +0200 Subject: Fix payment category search query --- src/server/Model/PaymentCategory.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/Model/PaymentCategory.hs b/src/server/Model/PaymentCategory.hs index 668fb01..7c504dc 100644 --- a/src/server/Model/PaymentCategory.hs +++ b/src/server/Model/PaymentCategory.hs @@ -53,7 +53,10 @@ save newName categoryId = Query (\conn -> do now <- getCurrentTime mbPaymentCategory <- listToMaybe <$> - (SQLite.query conn "SELECT * FROM payment_category WHERE name = ?" (Only newName) :: IO [PaymentCategory]) + (SQLite.query + conn + "SELECT * FROM payment_category WHERE name = ?" + (Only (formatPaymentName newName)) :: IO [PaymentCategory]) if isJust mbPaymentCategory then SQLite.execute -- cgit v1.2.3