From 5b4fb3f2cfeb6ed7844d566b8d83a551e96deb4a Mon Sep 17 00:00:00 2001 From: phot0n Date: Tue, 10 May 2022 16:29:47 +0530 Subject: [PATCH] fix: don't add navbar items if theyre already present * fix: don't set installed_apps global value in after_install hook --- frappe/utils/install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frappe/utils/install.py b/frappe/utils/install.py index 4342fb037f..1a0c83ffe8 100644 --- a/frappe/utils/install.py +++ b/frappe/utils/install.py @@ -18,9 +18,6 @@ def before_install(): def after_install(): - # reset installed apps for re-install - frappe.db.set_global("installed_apps", '["frappe"]') - create_user_type() install_basic_docs() @@ -242,6 +239,10 @@ def add_country_and_currency(name, country): def add_standard_navbar_items(): navbar_settings = frappe.get_single("Navbar Settings") + # don't add settings/help options if they're already present + if navbar_settings.settings_dropdown and navbar_settings.help_dropdown: + return + standard_navbar_items = [ { "item_label": "My Profile",