Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Dict on Query Param for Count Endpoints #309

Open
2 tasks
MRichards99 opened this issue Jan 31, 2022 · 0 comments · May be fixed by #326
Open
2 tasks

Empty Dict on Query Param for Count Endpoints #309

MRichards99 opened this issue Jan 31, 2022 · 0 comments · May be fixed by #326
Assignees
Labels
bug Something isn't working expands-search-api Issues relating to the ExPaNDS Search API section of this repo

Comments

@MRichards99
Copy link
Collaborator

Description:
On count endpoints, the following query param doesn't work (400 is returned):
where={}

However, on non-count endpoints, the following query param does work and basically behaves in a way that there are no filters:
filter={}

We should make the count version have a similar behaviour as the non-count version.

I only noticed this while writing tests with pytest.param(), trying to reduce duplication. I don't know how much a user would use an empty dict but perhaps they might. This might be a case of fixing if we have time, but not stressing about it if we can't. If so, the tests that I've skipped can be easily rewritten in a number of minutes to avoid this bug.

Acceptance criteria:

  • Make where={} work on count endpoints
  • Unskip relevant tests in test_count_dataset_files.py and test_count_endpoint.py
@VKTB VKTB self-assigned this Feb 8, 2022
VKTB added a commit that referenced this issue Feb 8, 2022
@VKTB VKTB linked a pull request Feb 8, 2022 that will close this issue
5 tasks
@MRichards99 MRichards99 added expands-search-api Issues relating to the ExPaNDS Search API section of this repo bug Something isn't working labels Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working expands-search-api Issues relating to the ExPaNDS Search API section of this repo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants