From 8291d28feec1decc1b36e11f91bc551ef7bb9d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Krone=CC=81?= Date: Wed, 7 Feb 2024 09:21:04 +0100 Subject: [PATCH] Previous fix to using existing collections in MongoLRUReader wasn't working. This should do it. --- locust_plugins/mongoreader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locust_plugins/mongoreader.py b/locust_plugins/mongoreader.py index ede5a88..5b5ad83 100644 --- a/locust_plugins/mongoreader.py +++ b/locust_plugins/mongoreader.py @@ -34,7 +34,7 @@ def __init__( """ self.timestamp_field = timestamp_field - if not coll: + if coll is None: self.coll: Collection = MongoClient(env["LOCUST_MONGO"])[env["LOCUST_MONGO_DATABASE"]][ env["LOCUST_MONGO_COLLECTION"] ]