fix: log error during exotel migration

This commit is contained in:
Ankush Menat 2023-07-18 13:01:33 +05:30
parent cfae52a40a
commit 07d2b896c1

View File

@ -1,5 +1,3 @@
from contextlib import suppress
import click import click
import frappe import frappe
from frappe import _ from frappe import _
@ -13,12 +11,14 @@ def execute():
if "exotel_integration" in frappe.get_installed_apps(): if "exotel_integration" in frappe.get_installed_apps():
return return
with suppress(Exception): try:
exotel = frappe.get_doc(SETTINGS_DOCTYPE) exotel = frappe.get_doc(SETTINGS_DOCTYPE)
if exotel.enabled: if exotel.enabled:
notify_existing_users() notify_existing_users()
frappe.delete_doc("DocType", SETTINGS_DOCTYPE) frappe.delete_doc("DocType", SETTINGS_DOCTYPE)
except Exception:
frappe.log_error("Failed to remove Exotel Integration.")
def notify_existing_users(): def notify_existing_users():