From e377c6519766fb9e65e3c138e061dcd64fd25456 Mon Sep 17 00:00:00 2001 From: Lorenzo Bolla Date: Mon, 27 Apr 2020 22:20:28 +0100 Subject: [PATCH] Honor SERVER_URIS when connecting to database --- mongs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongs.py b/mongs.py index b8af79b..a1ad8d3 100644 --- a/mongs.py +++ b/mongs.py @@ -48,7 +48,8 @@ def get_value(request): _id = request.path['filter'] key = request.path['value'] # derp - db = pymongo.MongoClient(server)[database][collection] + client = connect(server) + db = client[database][collection] filter = get_single_document_filter(_id) document = db.find_one(filter) return document[key]