fix: login as first user after setup wizard completes

This commit is contained in:
Jannat Patel 2026-03-26 13:25:55 +05:30
parent 028fb1280c
commit de8cbf2d42

View file

@ -186,6 +186,13 @@ def run_setup_success(args): # nosemgrep
for hook in frappe.get_hooks("setup_wizard_success"):
frappe.get_attr(hook)(args)
install_fixtures.install()
if not frappe.conf.developer_mode:
login_as_first_user(args)
def login_as_first_user(args):
if args.get("email") and hasattr(frappe.local, "login_manager"):
frappe.local.login_manager.login_as(args.get("email"))
def get_stages_hooks(args): # nosemgrep