mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 19:37:56 +00:00
fix: (Linter) Write queries using QB/ORM and other minor lines for semgrep to skip
This commit is contained in:
@@ -99,18 +99,14 @@ class ProductFiltersBuilder:
|
||||
if not attributes:
|
||||
return []
|
||||
|
||||
result = frappe.db.sql(
|
||||
"""
|
||||
select
|
||||
distinct attribute, attribute_value
|
||||
from
|
||||
`tabItem Variant Attribute`
|
||||
where
|
||||
attribute in %(attributes)s
|
||||
and attribute_value is not null
|
||||
""",
|
||||
{"attributes": attributes},
|
||||
as_dict=1,
|
||||
result = frappe.get_all(
|
||||
"Item Variant Attribute",
|
||||
filters={
|
||||
"attribute": ["in", attributes],
|
||||
"attribute_value": ["is", "set"]
|
||||
},
|
||||
fields=["attribute", "attribute_value"],
|
||||
distinct=True
|
||||
)
|
||||
|
||||
attribute_value_map = {}
|
||||
|
||||
Reference in New Issue
Block a user