Skip to content
Merged
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
3 changes: 3 additions & 0 deletions smart_importer/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ def load_training_data(

def training_data_filter(self, txn: Transaction, account: str) -> bool:
"""Filter function for the training data."""
if len(txn.postings) < 2:
return False

found_import_account = False
for pos in txn.postings:
if pos.account not in self.open_accounts:
Expand Down