Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/fava/core/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import ply.yacc # type: ignore[import-untyped]
from beancount.core import account
from beancount.core.data import Transaction
from beancount.ops.summarize import clamp_opt

from fava.beans.account import get_entry_accounts
Expand Down Expand Up @@ -445,7 +446,11 @@ def __init__(self, value: str) -> None:

def apply(self, entries: Sequence[Directive]) -> Sequence[Directive]:
include = self._include
return [entry for entry in entries if include(entry)]
return [
entry
for entry in entries
if include(entry) or not isinstance(entry, Transaction)
]


class AccountFilter(EntryFilter):
Expand All @@ -472,4 +477,5 @@ def apply(self, entries: Sequence[Directive]) -> Sequence[Directive]:
account.has_component(name, value) or match(name)
for name in get_entry_accounts(entry)
)
or not isinstance(entry, Transaction)
]
Loading