From 4dfb44d0a2f6cdc2600fb81f82999dfeae065e42 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 18 Sep 2023 18:48:04 +0530 Subject: [PATCH] fix: assume v1 if path is not set Old `cmd` calls will not work otherwise. --- frappe/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/api/__init__.py b/frappe/api/__init__.py index e4f6056004..5c504b2512 100644 --- a/frappe/api/__init__.py +++ b/frappe/api/__init__.py @@ -72,7 +72,7 @@ API_URL_MAP = Map( def get_api_version() -> ApiVersion | None: - if not frappe.request or not frappe.request.path.startswith("/api"): + if not frappe.request: return if frappe.request.path.startswith(f"/api/{ApiVersion.V2.value}"):