Initialize next_num before loop in bnpl_payment (UnboundLocalError 500) #18
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: high
Category: bug
Location:
app.py:1543-1563Problem
next_numis only assigned inside the debts loop; if debt_id matches nothing the later reference raises UnboundLocalError (500) after save_debts already ran.Suggested fix
Set
next_num = Nonebefore the loop and guard the bills block, like match_bnpl does.Filed by automated code review.