From 9d4ca0f6990fad43e6b04363d7ea00c3a3c56571 Mon Sep 17 00:00:00 2001 From: iamkhanraheel Date: Mon, 23 Jun 2025 14:20:27 +0530 Subject: [PATCH] fix: update fieldname in filter --- .../doctype/party_specific_item/party_specific_item.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 0aef7d362e4..b903a339d83 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)) -- GitLab