fix: Handle exception
This commit is contained in:
parent
22dfb6a3d8
commit
d0a8f9d01f
1 changed files with 2 additions and 2 deletions
|
|
@ -158,8 +158,8 @@ def evaluate_dynamic_routes(rules, path):
|
|||
route_map = Map(rules)
|
||||
endpoint = None
|
||||
|
||||
if frappe.local.request:
|
||||
urls = route_map.bind_to_environ(frappe.local.request.environ or dict())
|
||||
if frappe.local.request and frappe.local.request.environ:
|
||||
urls = route_map.bind_to_environ(frappe.local.request.environ)
|
||||
try:
|
||||
endpoint, args = urls.match("/" + path)
|
||||
path = endpoint
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue