Renamed the "order" property to "ord" in the TransactionSortForm.Order class.

This commit is contained in:
2022-12-05 19:27:53 +08:00
parent 3d4d20614c
commit 1c44d51e92
2 changed files with 5 additions and 5 deletions

View File

@ -479,7 +479,7 @@ class TransactionSortForm(forms.Form):
post_orders.append(form.Order(txn, 9999))
else:
post_orders.append(form.Order(txn, int(post[key])))
post_orders.sort(key=lambda x: (x.order, x.txn.ord))
post_orders.sort(key=lambda x: (x.ord, x.txn.ord))
form.txn_orders = []
for i in range(len(post_orders)):
form.txn_orders.append(form.Order(post_orders[i].txn, i + 1))
@ -488,9 +488,9 @@ class TransactionSortForm(forms.Form):
class Order:
"""A transaction order"""
def __init__(self, txn: Transaction, order: int):
def __init__(self, txn: Transaction, ord: int):
self.txn = txn
self.order = order
self.ord = ord
class AccountForm(forms.Form):