Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Querying a view with a boolean type key raises a CloudantArgumentError #494

Copy link
Copy link
Closed
@rajahaidar

Description

@rajahaidar
Issue body actions

Bug Description

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

Create a cloudant database view, and attempt to query the view using the python-cloudant library as follows:

results = database.get_view_result('_design/doc', 'view-name', raw_result=True, key=False)

The above code will raise a CloudantArgumentError due to the validation on this line

if (not isinstance(val, RESULT_ARG_TYPES[key]) or

2. What you expected to happen

The expected outcome would be that the view get filtered by the boolean type key instead of raising the error

I removed the validation locally and reinitiated the view query, and the key filtered fine from the CouchDB library end i.e. their library accepted a boolean type for the key argument

3. What actually happened

A CloudantArgumentError was raised when trying to filter by a boolean value for the argument key

Environment details

Python 3.9.2
Database server: IBM Cloudant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.