fix(installer): don't set defaults for frappe.flags.root_username

Its set anyway when calling `setup_database()` (inside `get_root_connection()`)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-12-02 13:30:49 +05:30
parent d77abb2663
commit 5e1146e216
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -142,11 +142,6 @@ def install_db(
if not db_type:
db_type = frappe.conf.db_type
if not root_login and db_type == "mariadb":
root_login = "root"
elif not root_login and db_type == "postgres":
root_login = "postgres"
make_conf(
db_name,
site_config=site_config,
@ -159,8 +154,11 @@ def install_db(
)
frappe.flags.in_install_db = True
frappe.flags.root_login = root_login
frappe.flags.root_password = root_password
if root_login:
frappe.flags.root_login = root_login
if root_password:
frappe.flags.root_password = root_password
if setup:
setup_database(force, verbose, mariadb_user_host_login_scope)