fix(webform): Only show published web forms
This commit is contained in:
parent
61223092e0
commit
d23b293e1e
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ from frappe.website.page_renderers.document_page import DocumentPage
|
|||
|
||||
class WebFormPage(DocumentPage):
|
||||
def can_render(self):
|
||||
webform_name = frappe.db.exists("Web Form", {"route": self.path}, cache=True)
|
||||
webform_name = frappe.db.exists("Web Form", {"route": self.path, "published": 1}, cache=True)
|
||||
if webform_name:
|
||||
self.doctype = "Web Form"
|
||||
self.docname = webform_name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue