fix(NotFoundPage): Set default value for http_status_code
This commit is contained in:
parent
713fba3d62
commit
c85ff679ef
1 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue