fix in database restoration
This commit is contained in:
parent
1147ce0e06
commit
465f51d169
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue