diff --git a/accounting/utils.py b/accounting/utils.py index f7a6890..106e9c7 100644 --- a/accounting/utils.py +++ b/accounting/utils.py @@ -348,7 +348,7 @@ def sort_form_transaction_records(form): orders[no] = 9999 except ValueError: 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 new_form = {} for record_type in record_no.keys():