fix: pick the last signup template from hook (#17118)

This commit is contained in:
Jannat Patel 2022-06-10 15:00:32 +05:30 committed by GitHub
parent 49b36cc54c
commit 70188934bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,10 +55,10 @@ def get_context(context):
)
signup_form_template = frappe.get_hooks("signup_form_template")
if signup_form_template and len(signup_form_template) and signup_form_template[0]:
path = signup_form_template[0]
if signup_form_template and len(signup_form_template):
path = signup_form_template[-1]
if not guess_is_path(path):
path = frappe.get_attr(signup_form_template[0])()
path = frappe.get_attr(signup_form_template[-1])()
else:
path = "frappe/templates/signup.html"
if path: