Renamed a variable to prevent shadowing the outer variables in the sort_form_transaction_records() utility in the accounting application.

This commit is contained in:
依瑪貓 2020-08-02 02:40:00 +08:00
parent 73c961cfee
commit 066fd1cb3f

View File

@ -348,7 +348,7 @@ def sort_form_transaction_records(form):
orders[no] = 9999 orders[no] = 9999
except ValueError: except ValueError:
orders[no] = 9999 orders[no] = 9999
record_no[record_type].sort(key=lambda x: orders[x]) record_no[record_type].sort(key=lambda n: orders[n])
# Constructs the sorted new form # Constructs the sorted new form
new_form = {} new_form = {}
for record_type in record_no.keys(): for record_type in record_no.keys():