diff --git a/erpnext/selling/doctype/party_specific_item/party_specific_item.py b/erpnext/selling/doctype/party_specific_item/party_specific_item.py index 0aef7d362e4db017aea4702b156c2f1dbe9ab5d4..b903a339d83e855776fe49639ae403e2b3ce3b59 100644 --- a/erpnext/selling/doctype/party_specific_item/party_specific_item.py +++ b/erpnext/selling/doctype/party_specific_item/party_specific_item.py @@ -9,13 +9,13 @@ from frappe.model.document import Document class PartySpecificItem(Document): def validate(self): exists = frappe.db.exists( + "Party Specific Item", { - "doctype": "Party Specific Item", "party_type": self.party_type, "party": self.party, "restrict_based_on": self.restrict_based_on, - "based_on": self.based_on_value, - } + "based_on_value": self.based_on_value, + }, ) if exists: frappe.throw(_("This item filter has already been applied for the {0}").format(self.party_type))