fix: functions using mutable defaults (#25370)

This commit is contained in:
Ankush Menat
2021-04-19 10:33:39 +05:30
committed by GitHub
parent e782531529
commit 7eac4a250d
3 changed files with 10 additions and 4 deletions

View File

@@ -713,7 +713,9 @@ def get_tax_template(doctype, txt, searchfield, start, page_len, filters):
return [(d,) for d in set(taxes)]
def get_fields(doctype, fields=[]):
def get_fields(doctype, fields=None):
if fields is None:
fields = []
meta = frappe.get_meta(doctype)
fields.extend(meta.get_search_fields())