Skip to content

Commit

Permalink
Merge pull request #36685 from shariquerik/api-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik authored Aug 17, 2023
2 parents 6bf79f1 + 21c1141 commit 5d9dde9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,9 @@ def set_other_charges(self):

def validate_enabled_taxes_and_charges(self):
taxes_and_charges_doctype = self.meta.get_options("taxes_and_charges")
if frappe.get_cached_value(taxes_and_charges_doctype, self.taxes_and_charges, "disabled"):
if self.taxes_and_charges and frappe.get_cached_value(
taxes_and_charges_doctype, self.taxes_and_charges, "disabled"
):
frappe.throw(
_("{0} '{1}' is disabled").format(taxes_and_charges_doctype, self.taxes_and_charges)
)
Expand Down

0 comments on commit 5d9dde9

Please sign in to comment.