From: Dustin Walde Date: Sun, 12 Nov 2023 06:53:59 +0000 (-0800) Subject: Fix require_documents option by using config str X-Git-Url: https://git.walde.dev/?a=commitdiff_plain;h=359f53d4ab9a0a94e684d15bd7c2076da7795613;p=beanbeanbean Fix require_documents option by using config str --- diff --git a/src/beanbeanbean/require_documents.py b/src/beanbeanbean/require_documents.py index fe66fd1..5429b53 100644 --- a/src/beanbeanbean/require_documents.py +++ b/src/beanbeanbean/require_documents.py @@ -9,11 +9,12 @@ __plugins__ = ('require_documents',) def require_documents(entries: Entries, options_map, config_string=""): + del options_map errors = [] require_transactions = True require_balances = True - if 'require_documents' in options_map: - types = options_map['require_documents'].lower().split(",") + if len(config_string) > 0: + types = config_string.lower().split(",") require_transactions = "transaction" in types or "transactions" in types require_balances = "balance" in types or "balances" in types