exclude current doc while validating (#13450)

This commit is contained in:
Shreya Shah 2018-04-02 10:43:19 +05:30 committed by Nabin Hait
parent e9ca5e81d2
commit d021e45301

View File

@ -17,6 +17,5 @@ class SalaryComponent(Document):
self.salary_component.split()]).upper()
self.salary_component_abbr = self.salary_component_abbr.strip()
self.salary_component_abbr = append_number_if_name_exists('Salary Component',
self.salary_component_abbr, 'salary_component_abbr', separator='_')
self.salary_component_abbr = append_number_if_name_exists('Salary Component', self.salary_component_abbr,
'salary_component_abbr', separator='_', filters={"name": ["!=", self.name]})