Merge pull request #48194 from iamkhanraheel/fix-party-specific-exist-filter
fix: filter to validate existing item in Party Specific Item
This commit is contained in:
@@ -23,13 +23,13 @@ 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))
|
||||
|
||||
Reference in New Issue
Block a user