mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
perf: remove unecessary calls to deepcopy
This commit is contained in:
@@ -35,7 +35,7 @@ def get_brand_defaults(item, company):
|
|||||||
|
|
||||||
for d in brand.brand_defaults or []:
|
for d in brand.brand_defaults or []:
|
||||||
if d.company == company:
|
if d.company == company:
|
||||||
row = copy.deepcopy(d.as_dict())
|
row = d.as_dict(no_private_properties=True)
|
||||||
row.pop("name")
|
row.pop("name")
|
||||||
return row
|
return row
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ def get_item_group_defaults(item, company):
|
|||||||
|
|
||||||
for d in item_group.item_group_defaults or []:
|
for d in item_group.item_group_defaults or []:
|
||||||
if d.company == company:
|
if d.company == company:
|
||||||
row = copy.deepcopy(d.as_dict())
|
row = d.as_dict(no_private_properties=True)
|
||||||
row.pop("name")
|
row.pop("name")
|
||||||
return row
|
return row
|
||||||
|
|
||||||
|
|||||||
@@ -1277,7 +1277,7 @@ def get_item_defaults(item_code, company):
|
|||||||
|
|
||||||
for d in item.item_defaults:
|
for d in item.item_defaults:
|
||||||
if d.company == company:
|
if d.company == company:
|
||||||
row = copy.deepcopy(d.as_dict())
|
row = d.as_dict(no_private_properties=True)
|
||||||
row.pop("name")
|
row.pop("name")
|
||||||
out.update(row)
|
out.update(row)
|
||||||
return out
|
return out
|
||||||
|
|||||||
Reference in New Issue
Block a user