瀏覽代碼

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


Loading…
取消
儲存