refactor(buying): replace raw sql with orm in supplier scorecard (#54771)

Use frappe.get_all instead of frappe.db.sql to fetch standings list.
This commit is contained in:
Loïc Oberle
2026-05-07 12:55:06 +02:00
committed by GitHub
parent 0fc96e8f7d
commit bbb6d7c004

View File

@@ -40,14 +40,7 @@ def get_scoring_standing(standing_name: str):
@frappe.whitelist()
def get_standings_list():
standings = frappe.db.sql(
"""
SELECT
scs.name
FROM
`tabSupplier Scorecard Standing` scs""",
{},
as_dict=1,
)
"""Returns a list of all Supplier Scorecard Standings."""
standings = frappe.get_all("Supplier Scorecard Standing", fields=["name"])
return standings