Merge pull request #13728 from gavindsouza/page-renderer-not-found

fix(NotFoundPage): Set default value for http_status_code
This commit is contained in:
mergify[bot] 2021-07-16 06:50:44 +00:00 committed by GitHub
commit 9fa46023b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,11 +8,11 @@ from frappe.website.utils import can_cache
HOMEPAGE_PATHS = ('/', '/index', 'index')
class NotFoundPage(TemplatePage):
def __init__(self, path, http_status_code):
def __init__(self, path, http_status_code=None):
self.request_path = path
self.request_url = frappe.local.request.url if hasattr(frappe.local, 'request') else ''
path = '404'
http_status_code = 404
http_status_code = http_status_code or 404
super().__init__(path=path, http_status_code=http_status_code)
def can_render(self):