diff options
author | Tavis Ormandy <taviso@gmail.com> | 2024-08-08 15:12:59 -0700 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2024-08-08 13:26:45 -1000 |
commit | 185ed9085467df5a49c2393efc8bce6166d0697a (patch) | |
tree | 61e2d32c85074a6f4852db4b425dec1afd9ed3f0 | |
parent | efd55c763699a3e38fc4a5ba72e114b8b0781b66 (diff) | |
download | fork-ledger-185ed9085467df5a49c2393efc8bce6166d0697a.tar.gz fork-ledger-185ed9085467df5a49c2393efc8bce6166d0697a.tar.bz2 fork-ledger-185ed9085467df5a49c2393efc8bce6166d0697a.zip |
disable checking for generated transactions
There is no parse_context_stack for generated transactions, because they
were not parsed from anywhere. This breaks strict checking, because
errors can't be reported.
It doesn't make sense to report errors for these anyway, so lets just
disable them.
-rw-r--r-- | src/draft.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/draft.cc b/src/draft.cc index 5ce41dc5..f9a0ad14 100644 --- a/src/draft.cc +++ b/src/draft.cc @@ -242,6 +242,9 @@ xact_t * draft_t::insert(journal_t& journal) xact_t * matching = NULL; unique_ptr<xact_t> added(new xact_t); + // There is no need to check drafts for errors, because we generated them. + journal.checking_style = journal_t::CHECK_PERMISSIVE; + if (xact_t * xact = lookup_probable_account(tmpl->payee_mask.str(), journal.xacts.rbegin(), journal.xacts.rend()).first) { |