From 58d05ac0e0a8ef89db41dc8dd5dea7686da8b74e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 10 Aug 2020 19:36:45 +0530 Subject: [PATCH] fix: check setup complete flag insted setup page --- erpnext/setup/install.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index aa9fbc0a92..50f9d84fce 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -7,6 +7,7 @@ import frappe from erpnext.accounts.doctype.cash_flow_mapper.default_cash_flow_mapper import DEFAULT_MAPPERS from .default_success_action import get_default_success_action from frappe import _ +from frappe.utils import cint from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to from frappe.custom.doctype.custom_field.custom_field import create_custom_field from erpnext.setup.default_energy_point_rules import get_default_energy_point_rules @@ -29,8 +30,8 @@ def after_install(): def check_setup_wizard_not_completed(): - if frappe.db.get_default('desktop:home_page') != 'setup-wizard': - message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed. + if cint(frappe.db.get_single_value('System Settings', 'setup_complete') or 0): + message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed. You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall""" frappe.throw(message)