Details
-
Bug
-
Resolution: Fixed
-
Test Blocker
-
None
-
None
-
DOC-2023-S19, DOC-2023-S20, DOC-2023-S21, DOC-2023-S22, DOC-2023-S23, DOC-2023-S24
Description
Replace is not working in sub-document operations:
Code:
import couchbase.subdocument as SD
db._adapter.collection.mutate_in('airline1', (SD.replace('name', 'Arslan Airways')))
print(db._adapter.getDocument(docids =['airline1']))
error: Traceback (most recent call last):
File "/Users/user/Documents/pydal/test.py", line 90, in <module>
db._adapter.collection.mutate_in('airline1', (SD.replace('extra', 'field')))
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/couchbase/logic/wrappers.py", line 102, in wrapped_fn
raise excptn from None
couchbase.exceptions.InternalSDKException: InternalSDKException(<message='SubDocOp' object is not subscriptable>)
Browser environment: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15
Reporter: Eelaaf Zahid
E-mail: eelaaf.zahid@ibm.com