From b9b0cd584a6bd21e19f868a761223bb2034a4e54 Mon Sep 17 00:00:00 2001 From: Andreas Sauerwein-Schlosser Date: Sun, 23 Jun 2024 13:08:21 +0200 Subject: [PATCH] fix date comparison for subscriptions --- download_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_v2.py b/download_v2.py index 8353b7a..189b324 100755 --- a/download_v2.py +++ b/download_v2.py @@ -375,7 +375,7 @@ def save_subscription_invoice(subscription_invoices, desired_invoice_date, vin): INVOICE_PATH.mkdir(parents=True, exist_ok=True) for invoice in subscription_invoices: - invoice_datetime = datetime.fromisoformat(subscription_invoices[0]["InvoiceDate"]) + invoice_datetime = datetime.fromisoformat(invoice["InvoiceDate"]) # check for desired invoice date if desired_invoice_date.year == 1999: