From 8a53b715c5cea5eda0b6dc529c10beb3775d14c8 Mon Sep 17 00:00:00 2001 From: Per Kraulis Date: Wed, 3 Nov 2021 15:39:00 +0100 Subject: [PATCH] Defensive programming for partitioned. --- couchdb2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchdb2.py b/couchdb2.py index fcd57bd..57ecb80 100644 --- a/couchdb2.py +++ b/couchdb2.py @@ -351,7 +351,7 @@ def create(self, n=3, q=8, partitioned=False): - `q`: The number of shards. - `partitioned`: Whether to create a partitioned database. """ - params = {"n": n, "q": q, "partitioned": str(partitioned).lower()} + params = {"n": n, "q": q, "partitioned": str(bool(partitioned)).lower()} self.server._PUT(self.name, params=params) return self