fix: assume v1 if path is not set
Old `cmd` calls will not work otherwise.
This commit is contained in:
parent
e2714c3e1c
commit
4dfb44d0a2
1 changed files with 1 additions and 1 deletions
|
|
@ -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}"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue