perf: remove unecessary calls to deepcopy

This commit is contained in:
Sagar Vora
2025-08-12 16:17:02 +05:30
parent e11cadca58
commit 8b75993d3a
3 changed files with 3 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ def get_brand_defaults(item, company):
for d in brand.brand_defaults or []:
if d.company == company:
row = copy.deepcopy(d.as_dict())
row = d.as_dict(no_private_properties=True)
row.pop("name")
return row

View File

@@ -90,7 +90,7 @@ def get_item_group_defaults(item, company):
for d in item_group.item_group_defaults or []:
if d.company == company:
row = copy.deepcopy(d.as_dict())
row = d.as_dict(no_private_properties=True)
row.pop("name")
return row

View File

@@ -1277,7 +1277,7 @@ def get_item_defaults(item_code, company):
for d in item.item_defaults:
if d.company == company:
row = copy.deepcopy(d.as_dict())
row = d.as_dict(no_private_properties=True)
row.pop("name")
out.update(row)
return out