mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: use get all instead of get list to fetch item attributes (#20793)
This commit is contained in:
@@ -188,7 +188,9 @@ def get_attributes_and_values(item_code):
|
|||||||
|
|
||||||
def get_numeric_values():
|
def get_numeric_values():
|
||||||
attribute_values_list = []
|
attribute_values_list = []
|
||||||
numeric_attributes = frappe.get_list("Item Attribute", fields=['name', 'from_range', 'to_range', 'increment'], filters={"numeric_values": 1})
|
numeric_attributes = frappe.db.get_all("Item Attribute",
|
||||||
|
fields=['name', 'from_range', 'to_range', 'increment'],
|
||||||
|
filters={"numeric_values": 1})
|
||||||
for attribute in numeric_attributes:
|
for attribute in numeric_attributes:
|
||||||
from_range = attribute["from_range"]
|
from_range = attribute["from_range"]
|
||||||
to_range = attribute['to_range'] + attribute['increment']
|
to_range = attribute['to_range'] + attribute['increment']
|
||||||
|
|||||||
Reference in New Issue
Block a user