Skip to content

Commit a467a57

Browse files
committed
Edits.
1 parent d4cbe18 commit a467a57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

django_mongodb_backend/query_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def is_direct_value(node):
7-
return not hasattr(node, "as_sql") and not hasattr(node, "as_mql")
7+
return not hasattr(node, "as_sql")
88

99

1010
def process_lhs(node, compiler, connection):

tests/queries_/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,11 @@ def tearDown(self):
296296

297297
def test_search_text(self):
298298
qs = Article.objects.annotate(score=SearchText(path="body", query="lazy"))
299-
self.wait_for_assertion(lambda: self.assertCountEqual([self.article], qs))
299+
self.wait_for_assertion(lambda: self.assertCountEqual([self.article], qs.all()))
300300

301301
def test_search_lookup(self):
302302
qs = Article.objects.filter(body__search="lazy")
303-
self.wait_for_assertion(lambda: self.assertCountEqual([self.article], qs))
303+
self.wait_for_assertion(lambda: self.assertCountEqual([self.article], qs.all()))
304304

305305
def test_search_text_with_fuzzy_and_criteria(self):
306306
qs = Article.objects.annotate(

0 commit comments

Comments
 (0)