From 185ed9085467df5a49c2393efc8bce6166d0697a Mon Sep 17 00:00:00 2001 From: Tavis Ormandy Date: Thu, 8 Aug 2024 15:12:59 -0700 Subject: 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. --- src/draft.cc | 3 +++ 1 file changed, 3 insertions(+) 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 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) { -- cgit v1.2.3