fix: update fieldname in filter

This commit is contained in:
iamkhanraheel
2025-06-23 14:20:27 +05:30
parent 2c54933e3e
commit 99bc02d0e0

View File

@@ -23,13 +23,13 @@ class PartySpecificItem(Document):
def validate(self): def validate(self):
exists = frappe.db.exists( exists = frappe.db.exists(
"Party Specific Item",
{ {
"doctype": "Party Specific Item",
"party_type": self.party_type, "party_type": self.party_type,
"party": self.party, "party": self.party,
"restrict_based_on": self.restrict_based_on, "restrict_based_on": self.restrict_based_on,
"based_on": self.based_on_value, "based_on_value": self.based_on_value,
} },
) )
if exists: if exists:
frappe.throw(_("This item filter has already been applied for the {0}").format(self.party_type)) frappe.throw(_("This item filter has already been applied for the {0}").format(self.party_type))