Patch fixes (#15295)
* patch fixes * [Fix] disable shopify if any exception occured while
This commit is contained in:
parent
02257449d9
commit
0754ece288
@ -6,4 +6,7 @@ def execute():
|
|||||||
if not company:
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
frappe.reload_doc("hr", "doctype", "Employee Tax Exemption Declaration")
|
||||||
|
frappe.reload_doc("hr", "doctype", "Employee Tax Exemption Proof Submission")
|
||||||
|
|
||||||
make_custom_fields(update=False)
|
make_custom_fields(update=False)
|
@ -21,9 +21,13 @@ def execute():
|
|||||||
setup_app_type()
|
setup_app_type()
|
||||||
|
|
||||||
def setup_app_type():
|
def setup_app_type():
|
||||||
shopify_settings = frappe.get_doc("Shopify Settings")
|
try:
|
||||||
shopify_settings.app_type = 'Private'
|
shopify_settings = frappe.get_doc("Shopify Settings")
|
||||||
shopify_settings.update_price_in_erpnext_price_list = 0 if getattr(shopify_settings, 'push_prices_to_shopify', None) else 1
|
shopify_settings.app_type = 'Private'
|
||||||
shopify_settings.flags.ignore_mandatory = True
|
shopify_settings.update_price_in_erpnext_price_list = 0 if getattr(shopify_settings, 'push_prices_to_shopify', None) else 1
|
||||||
shopify_settings.ignore_permissions = True
|
shopify_settings.flags.ignore_mandatory = True
|
||||||
shopify_settings.save()
|
shopify_settings.ignore_permissions = True
|
||||||
|
shopify_settings.save()
|
||||||
|
except Exception:
|
||||||
|
frappe.db.set_value("Shopify Shopify", None, "enable_shopify", 0)
|
||||||
|
frappe.log_error(frappe.get_traceback())
|
Loading…
x
Reference in New Issue
Block a user