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