Cached calls (#15109)

* [optimize]: bin updates

* [optimise]: use frappe.get_cached_value instead of get_value for item

* [fix]: change db.get_cached_value to get_cached_value
This commit is contained in:
Himanshu Mishra
2018-08-08 18:33:50 +05:30
committed by Nabin Hait
parent f56aac65e1
commit 859d942b22
7 changed files with 21 additions and 21 deletions

View File

@@ -144,7 +144,7 @@ def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None):
distinct_uoms = list(set([d.get(uom_field) for d in doc.get_all_children()]))
integer_uoms = filter(lambda uom: frappe.db.get_value("UOM", uom,
"must_be_whole_number") or None, distinct_uoms)
"must_be_whole_number", cache=True) or None, distinct_uoms)
if not integer_uoms:
return