Skip to content

Commit

Permalink
handle row field lookups more gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
hamvocke committed Nov 21, 2024
1 parent ecfe065 commit b5911a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dkb2homebank.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ def convert_giro(file_path, output_file="giroHomebank.csv"):
for row in reader:
writer.writerow(
{
'date': convert_short_date(row["buchungsdatum"]),
'date': convert_short_date(row.get("buchungsdatum")),
'paymode': 8,
'info': None,
'payee': f"{row['zahlungsempfänger*in']} {row['IBAN']}",
'memo': row["verwendungszweck"],
'amount': strip_currency(row["betrag"]),
'payee': f"{row.get('zahlungsempfänger*in')} {row.get('IBAN')}",
'memo': row.get("verwendungszweck"),
'amount': strip_currency(row.get("betrag")),
'category': None,
'tags': None
})
Expand Down

0 comments on commit b5911a9

Please sign in to comment.