From c70e6f23df8fa6b3bf46ff6a2cb34ae0b7943686 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:43:46 +0530 Subject: [PATCH] fix: ignore non-existing regional customizations (backport #38621) (#38624) fix: ignore non-existing regional customizations (#38621) (cherry picked from commit 9611e9bd7fea9301fb850dfc28cd52f46464daab) Co-authored-by: Ankush Menat --- erpnext/setup/setup_wizard/operations/taxes_setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 49ba78c63a..32d92f6459 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -2,8 +2,8 @@ # License: GNU General Public License v3. See license.txt -import os import json +import os import frappe from frappe import _ @@ -114,10 +114,11 @@ def update_regional_tax_settings(country, company): frappe.scrub(country) ) frappe.get_attr(module_name)(country, company) - except Exception as e: + except (ImportError, AttributeError): + pass + except Exception: # Log error and ignore if failed to setup regional tax settings frappe.log_error("Unable to setup regional tax settings") - pass def make_taxes_and_charges_template(company_name, doctype, template):