diff options
author | Joris | 2019-10-06 19:28:54 +0200 |
---|---|---|
committer | Joris | 2019-10-06 19:28:54 +0200 |
commit | f4c5df9e1b1afddeb5a482d4fbe654d0b321159c (patch) | |
tree | 206e02b4b0a6f78d5acf04ce89ff5fa4b07397a2 /server/src/Persistence/PaymentCategory.hs | |
parent | 2d79ab0e0a11f55255fc21a5dfab1598d3beeba3 (diff) |
Make payment edition to work on the frontend
Diffstat (limited to 'server/src/Persistence/PaymentCategory.hs')
-rw-r--r-- | server/src/Persistence/PaymentCategory.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/Persistence/PaymentCategory.hs b/server/src/Persistence/PaymentCategory.hs index 7dc363c..46be7f5 100644 --- a/server/src/Persistence/PaymentCategory.hs +++ b/server/src/Persistence/PaymentCategory.hs @@ -84,6 +84,6 @@ deleteIfUnused name = Query (\conn -> SQLite.execute conn - "DELETE FROM payment_category WHERE name = lower(?) AND name IN (SELECT DISTINCT lower(name) FROM payment WHERE name = lower(?) AND deleted_at IS NOT NULL)" + "DELETE FROM payment_category WHERE name = lower(?) AND name NOT IN (SELECT DISTINCT lower(name) FROM payment WHERE lower(name) = lower(?) AND deleted_at IS NULL)" (name, name) ) >> return () |