diff --git a/Hledger/Cli/Commands/Add.hs b/Hledger/Cli/Commands/Add.hs index ede911b9b..c4b9a3788 100644 --- a/Hledger/Cli/Commands/Add.hs +++ b/Hledger/Cli/Commands/Add.hs @@ -54,7 +54,7 @@ getTransaction j opts args defaultDate = do (Just $ showDate defaultDate) (Just $ \s -> null s || isRight (parse (smartdate >> many spacenonewline >> eof) "" $ lowercase s)) - description <- askFor "description" Nothing (Just $ not . null) + description <- askFor "description" (Just "") Nothing let historymatches = transactionsSimilarTo j args description bestmatch | null historymatches = Nothing | otherwise = Just $ snd $ head historymatches diff --git a/tests/add-blank-description-fails.test b/tests/add-blank-description-fails.test deleted file mode 100644 index f8c833ae6..000000000 --- a/tests/add-blank-description-fails.test +++ /dev/null @@ -1,5 +0,0 @@ -bin/hledger -f nosuch.journal add -<<< - - ->>>2 /date .*: description: description:/