From 213534112567f8705bec606998b11c1be2a4f443 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 3 Oct 2023 10:00:23 -0700 Subject: [PATCH] Fix conditional check for oldest_overdue_date (#1269) --- pay-api/src/pay_api/services/statement.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pay-api/src/pay_api/services/statement.py b/pay-api/src/pay_api/services/statement.py index 621451ab6..675d91e07 100644 --- a/pay-api/src/pay_api/services/statement.py +++ b/pay-api/src/pay_api/services/statement.py @@ -186,7 +186,8 @@ def get_summary(auth_account_id: str): .one_or_none() total_due = float(result.total_due) if result else 0 - oldest_overdue_date = get_local_formatted_date(result.oldest_overdue_date) if result else None + oldest_overdue_date = get_local_formatted_date(result.oldest_overdue_date) \ + if result and result.oldest_overdue_date else None return { 'total_due': total_due, 'oldest_overdue_date': oldest_overdue_date