浏览代码

fix: Show error page even when routing fails (#18437) (#18438)

(cherry picked from commit cc72dc47ab)

Co-authored-by: Ankush Menat <ankush@frappe.io>
version-14
mergify[bot] 2 年前
committed by GitHub
父节点
当前提交
5d3e97a7b6
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      frappe/website/page_renderers/base_template_page.py

+ 3
- 1
frappe/website/page_renderers/base_template_page.py 查看文件

@@ -64,7 +64,9 @@ class BaseTemplatePage(BaseRenderer):
self.context.url_prefix += "/"

self.context.path = self.path
self.context.pathname = frappe.local.path if hasattr(frappe, "local") else self.path
self.context.pathname = (
getattr(frappe.local, "path", None) if hasattr(frappe, "local") else self.path
)

def update_website_context(self):
# apply context from hooks


正在加载...
取消
保存