-
Notifications
You must be signed in to change notification settings - Fork 55
Creating a Design Doc with partitioned = false still creates design doc with partitioned enabled #466
Comments
Hi @CodipherX, I'm not witnessing this issue when I try to create a design document in either a non-partitioned or a partitioned database. |
Hi @emlaver , I tried doing a dummy experiment again and got the same issue. The steps I followed are:
The partition is coming as enabled as can be seen below: However when I add the else clause as described in Workaround, I get the following info:
|
@CodipherX I can confirm that I'm seeing this issue as well. Would you like to open up a PR with your fix? |
@emlaver Sure. I will open a PR soon. |
) Set default value for 'partitioned' parameter to false when creating a design document. Co-authored-by: dipjyoti bisharad <[email protected]> #466
Please read these guidelines before opening an issue.
Bug Description
I created a design document with following params:
ddoc = DesignDocument(db,"doc_id",partitioned=False)
However cloudant still created design doc with partitioned enabled in CouchDB
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Create a design doc with following conf:
ddoc = DesignDocument(db,"doc_id",partitioned=False)
ddoc.add_view(ddoc_name,mapper)
ddoc.save()
2. What you expected to happen
The design doc should get created with partition disabled
3. What actually happened
The design doc gets created with partition enabled
Environment details
Cloudant Version: 2.13.0
CouchDB: 3.0.0
4. Workaround
I found the possible cause of the issue in src/cloudant/design_document.py
In the init function, the setdefault is given only for partitioned=True. I added the options for else condition as well
if partitioned:
self.setdefault('options', {'partitioned': True})
else:
self.setdefault('options', {'partitioned': False})
it solved my issue.
The text was updated successfully, but these errors were encountered: