From 572b810c9089028ad261947f1c8f53931d8b82a7 Mon Sep 17 00:00:00 2001 From: Graham Blair Date: Thu, 1 Aug 2024 09:13:02 -0700 Subject: [PATCH] Fix key error --- splitwise_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splitwise_helper.py b/splitwise_helper.py index 5fb4e12..a53a1d5 100644 --- a/splitwise_helper.py +++ b/splitwise_helper.py @@ -225,7 +225,7 @@ def handle_personal_loans(self, loans): user_id = loan['user_id'] rate = loan['rate'] budget_category = loan['budget_category'] - interest_free_balance = loan['interest_free_balance'] or 0 + interest_free_balance = loan.get('interest_free_balance', 0) logger.info(f"Processing loan for user {self.splitwise_user_id_to_name(user_id)} ({user_id}), with rate of {rate}")