fix: set a fallback for db user in connect()

In case we don't have a site name, `init()` won't be called, and we won't have a username

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2023-12-07 13:24:37 +05:30
parent c721fcf8c4
commit 7419da64a1
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -291,7 +291,7 @@ def connect(
local.db = get_db(
host=local.conf.db_host,
port=local.conf.db_port,
user=local.conf.db_user,
user=local.conf.db_user or db_name,
password=None,
)
if set_admin_as_user: