mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 01:14:46 +00:00
fix: single variant creation error
This commit is contained in:
@@ -889,8 +889,13 @@ class Item(Document):
|
|||||||
if disabled:
|
if disabled:
|
||||||
frappe.throw(_("Attribute {0} is disabled.").format(frappe.bold(d.attribute)))
|
frappe.throw(_("Attribute {0} is disabled.").format(frappe.bold(d.attribute)))
|
||||||
|
|
||||||
if not numeric_values and not frappe.db.exists(
|
if (
|
||||||
"Item Attribute Value", {"parent": d.attribute, "attribute_value": d.attribute_value}
|
not numeric_values
|
||||||
|
and d.attribute_value
|
||||||
|
and not frappe.db.exists(
|
||||||
|
"Item Attribute Value",
|
||||||
|
{"parent": d.attribute, "attribute_value": d.attribute_value},
|
||||||
|
)
|
||||||
):
|
):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Attribute Value {0} is not valid for the selected attribute {1}.").format(
|
_("Attribute Value {0} is not valid for the selected attribute {1}.").format(
|
||||||
|
|||||||
Reference in New Issue
Block a user