From 7fec0b69a082aaeec72fee0612766aa42f6b1b4d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 18 Apr 2024 07:52:35 +0200 Subject: Merging upstream version 9.4.0+dfsg. Signed-off-by: Daniel Baumann --- ansible_collections/community/mongodb/plugins/cache/mongodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ansible_collections/community/mongodb/plugins/cache') diff --git a/ansible_collections/community/mongodb/plugins/cache/mongodb.py b/ansible_collections/community/mongodb/plugins/cache/mongodb.py index b51b7b293..0fa7a2cd8 100644 --- a/ansible_collections/community/mongodb/plugins/cache/mongodb.py +++ b/ansible_collections/community/mongodb/plugins/cache/mongodb.py @@ -182,7 +182,7 @@ class CacheModule(BaseCacheModule): def contains(self, key): with self._collection() as collection: - return bool(collection.count({'_id': self._make_key(key)})) + return bool(collection.count_documents({'_id': self._make_key(key)})) def delete(self, key): del self._cache[key] -- cgit v1.2.3