Skip to content

Commit

Permalink
Fix conditional check for oldest_overdue_date (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Oct 3, 2023
1 parent 68892f2 commit 2135341
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pay-api/src/pay_api/services/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2135341

Please sign in to comment.