From fa4bccb2840c2618138a6404df3951c620b2148e Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 20 Dec 2021 10:07:04 +0530 Subject: [PATCH] fix: accept path instead of fn in signup hook --- frappe/www/login.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frappe/www/login.py b/frappe/www/login.py index 2b54fec83a..2f7c96702c 100644 --- a/frappe/www/login.py +++ b/frappe/www/login.py @@ -41,10 +41,8 @@ def get_context(context): frappe.get_system_settings("app_name") or _("Frappe")) custom_signup = frappe.get_hooks("custom_signup_form") - if custom_signup: - path = frappe.get_attr(custom_signup[0])() - if path: - context["custom_signup_form"] = frappe.get_template(path).render() + if custom_signup and len(custom_signup) and custom_signup[0]: + context["custom_signup_form"] = frappe.get_template(custom_signup[0]).render() providers = [i.name for i in frappe.get_all("Social Login Key", filters={"enable_social_login":1}, order_by="name")] for provider in providers: