Fix: correctly handle "exists, false" in custom field query filter (#8158)

This commit is contained in:
Yichi Yang
2024-11-02 18:40:50 -07:00
committed by GitHub
parent aeed909a20
commit fb36b50ec5
2 changed files with 24 additions and 10 deletions

View File

@@ -289,6 +289,12 @@ class TestCustomFieldsSearch(DirectoriesMixin, APITestCase):
lambda document: "string_field" in document,
)
def test_exists_false(self):
self._assert_query_match_predicate(
["string_field", "exists", False],
lambda document: "string_field" not in document,
)
def test_select(self):
# For select fields, you can either specify the index
# or the name of the option. They function exactly the same.