Skip to content

Commit 2a6a128

Browse files
committed
check fuzzy nullability
1 parent 6c116b3 commit 2a6a128

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_mongodb_backend/expressions/search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def search_operator(self, compiler, connection):
544544
}
545545
if self.score:
546546
params["score"] = self.score.as_mql(compiler, connection)
547-
if self.fuzzy:
547+
if self.fuzzy is not None:
548548
params["fuzzy"] = self.fuzzy.value
549549
if self.match_criteria:
550550
params["matchCriteria"] = self.match_criteria.value
@@ -719,7 +719,7 @@ class SearchMoreLikeThis(SearchExpression):
719719
Reference: https://www.mongodb.com/docs/atlas/atlas-search/morelikethis/
720720
"""
721721

722-
def __init__(self, documents, score=None):
722+
def __init__(self, documents, *, score=None):
723723
self.documents = cast_as_value(documents)
724724
self.score = score
725725
super().__init__()

0 commit comments

Comments
 (0)