fix: only consider the Frappe and ERPNext apps for setup completion checks
(cherry picked from commit d5e1bf06b2b42cea72ee827582831e79edefee66) # Conflicts: # frappe/__init__.py
This commit is contained in:
parent
352173f922
commit
6d1517e7fb
2 changed files with 15 additions and 10 deletions
|
|
@ -1511,8 +1511,19 @@ def is_setup_complete():
|
|||
if not frappe.db.table_exists("Installed Application"):
|
||||
return setup_complete
|
||||
|
||||
<<<<<<< HEAD
|
||||
if all(frappe.get_all("Installed Application", {"has_setup_wizard": 1}, pluck="is_setup_complete")):
|
||||
setup_complete = True
|
||||
=======
|
||||
if all(
|
||||
frappe.get_all(
|
||||
"Installed Application",
|
||||
{"app_name": ("in", ["frappe", "erpnext"])},
|
||||
pluck="is_setup_complete",
|
||||
)
|
||||
):
|
||||
is_setup_complete = True
|
||||
>>>>>>> d5e1bf06b2 (fix: only consider the Frappe and ERPNext apps for setup completion checks)
|
||||
|
||||
return setup_complete
|
||||
|
||||
|
|
|
|||
|
|
@ -32,17 +32,11 @@ class InstalledApplications(Document):
|
|||
|
||||
self.delete_key("installed_applications")
|
||||
for app in frappe.utils.get_installed_apps_info():
|
||||
has_setup_wizard = 0
|
||||
if app.get("app_name") == "frappe" or frappe.get_hooks(app_name=app.get("app_name")).get(
|
||||
"setup_wizard_stages"
|
||||
):
|
||||
has_setup_wizard = 1
|
||||
|
||||
has_setup_wizard = 1
|
||||
setup_complete = app_wise_setup_details.get(app.get("app_name")) or 0
|
||||
if app.get("app_name") == "india_compliance":
|
||||
setup_complete = app_wise_setup_details.get("erpnext") or 0
|
||||
if app.get("app_name") == "insights":
|
||||
setup_complete = app_wise_setup_details.get("frappe") or 0
|
||||
if app.get("app_name") not in ["frappe", "erpnext"]:
|
||||
setup_complete = 0
|
||||
has_setup_wizard = 0
|
||||
|
||||
self.append(
|
||||
"installed_applications",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue