Files @ 18eebbc0ed28
Branch filter:

Location: NPO-Accounting/import2ledger/import2ledger/hooks/filter_by_date.py

Brett Smith
hooks: run() return value controls processing of entry data.

Instead of using in-band signaling with the entry_data dict.
I don't know why I didn't think of this in the first place.
class FilterByDateHook:
    def __init__(self, config):
        self.config = config

    def run(self, entry_data):
        try:
            date = entry_data['date']
        except KeyError:
            pass
        else:
            if not self.config.date_in_want_range(date):
                return False