From 9dee12d2c54730c0832a586e529a8e4f7bdb5d5e Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 12 Feb 2020 00:00:05 +0100 Subject: [PATCH] Fix push to ynab with revolut --- ofx_processor/revolut_processor/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ofx_processor/revolut_processor/main.py b/ofx_processor/revolut_processor/main.py index 5b239c4..90c8e31 100644 --- a/ofx_processor/revolut_processor/main.py +++ b/ofx_processor/revolut_processor/main.py @@ -5,6 +5,8 @@ from collections import defaultdict import click import dateparser +from ofx_processor.utils import ynab + def process_amount(amount): if amount: @@ -40,7 +42,7 @@ def process_outflow(line): default=False, help="Push data directly to YNAB instead of just writing a file.", ) -def cli(csv_filename, ynab): +def cli(csv_filename, push_to_ynab): formatted_data = [] ynab_transactions = [] transaction_ids = defaultdict(int) @@ -91,7 +93,7 @@ def cli(csv_filename, ynab): else: click.secho("Nothing to write.") - if ynab and ynab_transactions: + if push_to_ynab and ynab_transactions: ynab.push_transactions(ynab_transactions, "revolut")