From 5a534f1c739dda714a6711518e8369cd12904c97 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 19 Nov 2012 21:47:47 +0000 Subject: [PATCH] web: fix after refactor --- hledger-web/Handler/Handlers.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-web/Handler/Handlers.hs b/hledger-web/Handler/Handlers.hs index a0f3e87d9..1d9beae72 100644 --- a/hledger-web/Handler/Handlers.hs +++ b/hledger-web/Handler/Handlers.hs @@ -526,8 +526,8 @@ handleAdd = do maybeNonNull = maybe Nothing (\t -> if Data.Text.null t then Nothing else Just t) acct1E = maybe (Left "to account required") (Right . unpack) $ maybeNonNull acct1M acct2E = maybe (Left "from account required") (Right . unpack) $ maybeNonNull acct2M - amt1E = maybe (Left "amount required") (either (const $ Left "could not parse amount") Right . parseWithCtx nullctx amount . unpack) amt1M - amt2E = maybe (Right missingmixedamt) (either (const $ Left "could not parse amount") Right . parseWithCtx nullctx amount . unpack) amt2M + amt1E = maybe (Left "amount required") (either (const $ Left "could not parse amount") Right . parseWithCtx nullctx amountp . unpack) amt1M + amt2E = maybe (Right missingmixedamt) (either (const $ Left "could not parse amount") Right . parseWithCtx nullctx amountp . unpack) amt2M journalE = maybe (Right $ journalFilePath j) (\f -> let f' = unpack f in if f' `elem` journalFilePaths j