fix in database restoration

This commit is contained in:
nek0 2015-04-23 03:32:53 +02:00
parent 1147ce0e06
commit 465f51d169

View file

@ -1,6 +1,6 @@
module Handler.Summary where module Handler.Summary where
import Import import Import as I
import qualified Data.List as L import qualified Data.List as L
import Data.Aeson import Data.Aeson
import Data.Conduit.Binary import Data.Conduit.Binary
@ -78,7 +78,7 @@ postUploadInventoryJsonR = do
True -> do True -> do
source <- runResourceT $ fileSource file $$ sinkLbs source <- runResourceT $ fileSource file $$ sinkLbs
bevs <- return $ fromMaybe [] $ (decode source :: Maybe [BevStore]) bevs <- return $ fromMaybe [] $ (decode source :: Maybe [BevStore])
_ <- return $ map insOrUpd bevs I.mapM_ insOrUpd bevs
setMessageI MsgRestoreSuccess setMessageI MsgRestoreSuccess
redirect $ HomeR redirect $ HomeR
False -> do False -> do