[Fix]Codacy Issues
This commit is contained in:
parent
2da8f6e89d
commit
b9e44217a2
@ -233,12 +233,10 @@ def get_variants_attributes():
|
||||
def get_variant_values_for_(items):
|
||||
'''Returns variant values for items.'''
|
||||
attribute_map = {}
|
||||
for attr in frappe.db.sql('''select parent, attribute, attribute_value
|
||||
from
|
||||
`tabItem Variant Attribute`
|
||||
where parent in (%s);''' %", ".join(["%s"]*len(items)),
|
||||
tuple(items),
|
||||
as_dict=1):
|
||||
for attr in frappe.db.sql('''select parent, attribute,
|
||||
attribute_value from `tabItem Variant Attribute`
|
||||
where parent in (%s);
|
||||
''' % ", ".join(["%s"] * len(items)), tuple(items), as_dict=1):
|
||||
attribute_map.setdefault(attr['parent'], {})
|
||||
attribute_map[attr['parent']].update({attr['attribute']:attr['attribute_value']})
|
||||
return attribute_map
|
Loading…
x
Reference in New Issue
Block a user