fix key check for secure mongo connection (#5031)

This commit is contained in:
Jakub Trllo 2023-05-30 16:23:10 +02:00 committed by Jakub Trllo
parent bb6f43455f
commit a76989108e
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ def should_add_certificate_path_to_mongo_url(mongo_url):
add_certificate = False
# Check if url 'ssl' or 'tls' are set to 'true'
for key in ("ssl", "tls"):
if key in query and "true" in query["ssl"]:
if key in query and "true" in query[key]:
add_certificate = True
break

View file

@ -135,7 +135,7 @@ def should_add_certificate_path_to_mongo_url(mongo_url):
add_certificate = False
# Check if url 'ssl' or 'tls' are set to 'true'
for key in ("ssl", "tls"):
if key in query and "true" in query["ssl"]:
if key in query and "true" in query[key]:
add_certificate = True
break