Skip to content

Commit c2e6310

Browse files
committed
Default wallet location if not valued
1 parent 24cba8b commit c2e6310

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/server/utils/databases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def connect(config: Database) -> oracledb.Connection:
2828
include_fields = set(DatabaseAuth.model_fields.keys())
2929
db_config = config.model_dump(include=include_fields)
3030
logger.debug("Database Config: %s", db_config)
31+
# If a wallet password is provided but no wallet location is set, default the wallet location to the config directory
32+
if db_config.get("wallet_password") and not db_config.get("wallet_location"):
33+
db_config["wallet_location"] = db_config["config_dir"]
3134
# Check if connection settings are configured
3235
if any(not db_config[key] for key in ("user", "password", "dsn")):
3336
raise DbException(status_code=400, detail="missing connection details")

0 commit comments

Comments
 (0)