refactor: use db.get_single_value

This commit is contained in:
Ankush Menat
2024-01-09 21:56:47 +05:30
parent 74ceb6da5e
commit bb18ae82cf
26 changed files with 44 additions and 50 deletions

View File

@@ -338,7 +338,7 @@ def get_valuation_method(item_code):
val_method = frappe.db.get_value("Item", item_code, "valuation_method", cache=True)
if not val_method:
val_method = (
frappe.db.get_value("Stock Settings", None, "valuation_method", cache=True) or "FIFO"
frappe.db.get_single_value("Stock Settings", "valuation_method", cache=True) or "FIFO"
)
return val_method