api.db: enable boolean query fields for GET requests - #415
Merged
Conversation
Contributor
Author
|
Tested OK on staging: |
gctucker
reviewed
Nov 28, 2023
gctucker
left a comment
Contributor
There was a problem hiding this comment.
LGTM - some minor comments.
JenySadadia
force-pushed
the
translate-bool-fields
branch
from
November 30, 2023 10:37
78ef5c0 to
19c893d
Compare
added 2 commits
November 30, 2023 17:50
Enable support for querying boolean fields while getting objects from API such as nodes or models. e.g. find all the active admin users using `http://API_SERVER/users?is_active=true&is_superuser=true` Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
Instead of using integer values 1 and 0 for `User` model boolean fields, use `True` and `False` to enable querying boolean fields in MongoDB as per the syntax. Fixes: 310f3d6 ("migration: add migration for user documents") Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
JenySadadia
force-pushed
the
translate-bool-fields
branch
from
November 30, 2023 12:21
19c893d to
54008c5
Compare
Contributor
|
Thanks for the updates, LGTM now. I haven't tested it so not approving yet. |
Member
|
LGTM, tested by curl. |
Contributor
Author
Works for me: |
Member
|
You are right, sorry for noise, kci was pointing to wrong instance, my mistake. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #390
Fixes #410
Enable support for querying boolean fields while getting objects from API such as nodes or models.
e.g. find all the active admin users using
http://API_SERVER/users?is_active=true&is_superuser=true