diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-07-30 18:06:44 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-07-30 18:06:44 +0200 |
commit | f61bba8fbd7f596e503e67eac1b57945e81a709d (patch) | |
tree | 89ff8b451a22aeded5e5d59a2d1866ade74c33fa /Handler/InventoryListing.hs | |
parent | 8a8dc04c61dcc8dce910b148d3418c8e58e6d4da (diff) | |
download | bar-f61bba8fbd7f596e503e67eac1b57945e81a709d.tar bar-f61bba8fbd7f596e503e67eac1b57945e81a709d.tar.gz bar-f61bba8fbd7f596e503e67eac1b57945e81a709d.tar.bz2 bar-f61bba8fbd7f596e503e67eac1b57945e81a709d.tar.xz bar-f61bba8fbd7f596e503e67eac1b57945e81a709d.zip |
Clean up build somewhat
Diffstat (limited to 'Handler/InventoryListing.hs')
-rw-r--r-- | Handler/InventoryListing.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Handler/InventoryListing.hs b/Handler/InventoryListing.hs index d87512a..c61c62b 100644 --- a/Handler/InventoryListing.hs +++ b/Handler/InventoryListing.hs | |||
@@ -10,7 +10,7 @@ postInventoryListingR = do | |||
10 | 10 | ||
11 | case insertResult of | 11 | case insertResult of |
12 | FormSuccess (Item{..} `WithType` t) -> runDB $ do | 12 | FormSuccess (Item{..} `WithType` t) -> runDB $ do |
13 | upsertBy (UniqueKind itemNormKind) (Kind itemNormKind t) [ KindType =. t ] | 13 | void $ upsertBy (UniqueKind itemNormKind) (Kind itemNormKind t) [ KindType =. t ] |
14 | newItem <- insert Item{..} | 14 | newItem <- insert Item{..} |
15 | otherItems <- selectKeysList [ ItemNormKind ==. itemNormKind, ItemId !=. newItem ] [] | 15 | otherItems <- selectKeysList [ ItemNormKind ==. itemNormKind, ItemId !=. newItem ] [] |
16 | when (not $ null otherItems) . addMessage "insertAmbiguous" $ | 16 | when (not $ null otherItems) . addMessage "insertAmbiguous" $ |
@@ -42,5 +42,5 @@ putInventoryListingR :: Handler Value | |||
42 | putInventoryListingR = do | 42 | putInventoryListingR = do |
43 | (Item{..} `WithType` t) <- requireCheckJsonBody | 43 | (Item{..} `WithType` t) <- requireCheckJsonBody |
44 | returnJson <=< runDB $ do | 44 | returnJson <=< runDB $ do |
45 | upsertBy (UniqueKind itemNormKind) (Kind itemNormKind t) [ KindType =. t ] | 45 | void $ upsertBy (UniqueKind itemNormKind) (Kind itemNormKind t) [ KindType =. t ] |
46 | withType =<< insertEntity Item{..} | 46 | withType =<< insertEntity Item{..} |