diff options
author | Joris | 2017-06-06 18:47:04 +0200 |
---|---|---|
committer | Joris | 2017-06-06 18:47:04 +0200 |
commit | cc0aae170a8d0eeb87195b58ee2fb3b1b89fbbb7 (patch) | |
tree | d450614812f63f78cf5c9b2c3c2ef20936e269ee | |
parent | a345ce1404c9b23acc734d4db82ef391efe05c98 (diff) |
Fix payment category search query
-rw-r--r-- | src/server/Model/PaymentCategory.hs | 5 |
1 files changed, 4 insertions, 1 deletions
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 |