fix: minor linting issues (#27314)

* fix: syntax error in gratuity

* fix: unpacking None into three variables

* fix: unexpected kwarg for delete_accounting_dimensions
This commit is contained in:
Ankush Menat
2021-09-02 17:42:45 +05:30
committed by GitHub
parent 60185c8c71
commit eec40513be
3 changed files with 6 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ class GratuityRule(Document):
def validate(self):
for current_slab in self.gratuity_rule_slabs:
if (current_slab.from_year > current_slab.to_year) and current_slab.to_year != 0:
frappe(_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx))
frappe.throw(_("Row {0}: From (Year) can not be greater than To (Year)").format(current_slab.idx))
if current_slab.to_year == 0 and current_slab.from_year == 0 and len(self.gratuity_rule_slabs) > 1:
frappe.throw(_("You can not define multiple slabs if you have a slab with no lower and upper limits."))