Fix mongodb connection when overridden connection string contains connection options

This commit is contained in:
clearml 2024-12-05 22:25:35 +02:00
parent 57ce9446b1
commit 606bf2c4be

View File

@ -81,7 +81,7 @@ class DatabaseFactory:
entry = cls._create_db_entry(alias=alias, settings=db_entries.get(key))
if override_connection_string:
con_str = f"{override_connection_string.rstrip('/')}/{key}"
con_str = furl(override_connection_string).add(path=key).url
log.info(f"Using override mongodb connection string for {alias}: {con_str}")
entry.host = con_str
else: