Skip to content

Commit

Permalink
Only print table header if there are actually accounts that need upda…
Browse files Browse the repository at this point in the history
…tes.
  • Loading branch information
hoostus committed Jan 4, 2025
1 parent 5573a63 commit a99ccea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beancount_reds_importers/util/needs_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def accounts_needing_updates(beancount_file, recency, sort_by_date, all_accounts
for acc, bal in d.items()
if ((datetime.now().date() - d[acc].date).days > recency)
}
pretty_print_table(need_updates, sort_by_date)
if need_updates:
pretty_print_table(need_updates, sort_by_date)

# If there are accounts with zero balance entries, print them
accs_no_bal = accounts_with_no_balance_entries(entries, closes, last_balance)
Expand Down

0 comments on commit a99ccea

Please sign in to comment.