mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix: invalid escape sequences in regex
This commit is contained in:
@@ -339,7 +339,7 @@ def sort_accounts(accounts, is_root=False, key="name"):
|
||||
"""Sort root types as Asset, Liability, Equity, Income, Expense"""
|
||||
|
||||
def compare_accounts(a, b):
|
||||
if re.split('\W+', a[key])[0].isdigit():
|
||||
if re.split(r'\W+', a[key])[0].isdigit():
|
||||
# if chart of accounts is numbered, then sort by number
|
||||
return cmp(a[key], b[key])
|
||||
elif is_root:
|
||||
|
||||
Reference in New Issue
Block a user