diff --git a/frappe/utils/__init__.py b/frappe/utils/__init__.py index c9123a4ca6..43a7b82c16 100644 --- a/frappe/utils/__init__.py +++ b/frappe/utils/__init__.py @@ -231,7 +231,7 @@ def get_traceback() -> str: """ exc_type, exc_value, exc_tb = sys.exc_info() - if not any(exc_type, exc_value, exc_tb): + if not any([exc_type, exc_value, exc_tb]): return "" trace_list = traceback.format_exception(exc_type, exc_value, exc_tb) diff --git a/frappe/website/context.py b/frappe/website/context.py index 401912d407..c898d39869 100644 --- a/frappe/website/context.py +++ b/frappe/website/context.py @@ -61,7 +61,7 @@ def update_controller_context(context, controller): except (frappe.PermissionError, frappe.PageDoesNotExistError, frappe.Redirect): raise except: - if not any(frappe.flags.in_migrate, frappe.flags.in_website_search_build): + if not any([frappe.flags.in_migrate, frappe.flags.in_website_search_build]): frappe.errprint(frappe.utils.get_traceback()) if hasattr(module, "get_children"):