fix: linting

This commit is contained in:
unknown 2023-01-12 20:53:12 +05:30
parent 974e12c837
commit 2ca4d3fb71

View File

@ -75,11 +75,9 @@ class ItemAttribute(Document):
values, abbrs = [], [] values, abbrs = [], []
for d in self.item_attribute_values: for d in self.item_attribute_values:
if d.attribute_value.lower() in map(str.lower, values): if d.attribute_value.lower() in map(str.lower, values):
frappe.throw( frappe.throw(_("Attribute value: {0} must appear only once").format(d.attribute_value.title()))
_("Attribute value: {0} must appear only once").format(d.attribute_value.title()))
values.append(d.attribute_value) values.append(d.attribute_value)
if d.abbr.lower() in map(str.lower, abbrs): if d.abbr.lower() in map(str.lower, abbrs):
frappe.throw( frappe.throw(_("Abbreviation: {0} must appear only once").format(d.abbr.title()))
_("Abbreviation: {0} must appear only once").format(d.abbr.title()))
abbrs.append(d.abbr) abbrs.append(d.abbr)