aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorJoris2017-06-06 18:47:04 +0200
committerJoris2017-06-06 18:47:04 +0200
commitcc0aae170a8d0eeb87195b58ee2fb3b1b89fbbb7 (patch)
treed450614812f63f78cf5c9b2c3c2ef20936e269ee /src/server
parenta345ce1404c9b23acc734d4db82ef391efe05c98 (diff)
Fix payment category search query
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Model/PaymentCategory.hs5
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