seitime-frappe/frappe/website/page_controllers/error_page.py
Suraj Shetty 1987994310 refactor: Move unwanted code from validate
- Also, removed unwanted code in render.py
2021-05-17 23:37:28 +05:30

10 lines
390 B
Python

from frappe.website.page_controllers.template_page import TemplatePage
class ErrorPage(TemplatePage):
def __init__(self, path=None, http_status_code=None, exception=None):
path = 'error'
super().__init__(path=path, http_status_code=http_status_code)
self.http_status_code = getattr(exception, 'http_status_code', None) or http_status_code or 500
def validate(self):
return True