Merge pull request #22613 from netchampfaris/erpnext-install-check

fix: Check if homepage is not setup-wizard
This commit is contained in:
gavin 2020-07-10 18:01:30 +05:30 committed by GitHub
commit 35a443316c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,12 +29,10 @@ def after_install():
def check_setup_wizard_not_completed(): def check_setup_wizard_not_completed():
if frappe.db.get_default('desktop:home_page') == 'desktop': if frappe.db.get_default('desktop:home_page') != 'setup-wizard':
print() message = """ERPNext can only be installed on a fresh site where the setup wizard is not completed.
print("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"""
print("You can reinstall this site (after saving your data) using: bench --site [sitename] reinstall") frappe.throw(message)
print()
return False
def set_single_defaults(): def set_single_defaults():
@ -105,4 +103,3 @@ def add_company_to_session_defaults():
"ref_doctype": "Company" "ref_doctype": "Company"
}) })
settings.save() settings.save()