Skip to content

Commit b7ea348

Browse files
committed
fix typos causing test failures
1 parent 9aa65f2 commit b7ea348

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

django_mongodb_backend/expressions/search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def search_operator(self, compiler, connection):
169169
}
170170
if self.score:
171171
params["score"] = self.score.as_mql(compiler, connection)
172-
if self.fuzzy:
172+
if self.fuzzy is not None:
173173
params["fuzzy"] = self.fuzzy.value
174174
if self.token_order:
175175
params["tokenOrder"] = self.token_order.value
@@ -638,7 +638,7 @@ def get_search_fields(self, compiler, connection):
638638
def get_source_expressions(self):
639639
return [self.path, self.relation, self.geometry]
640640

641-
def set_source_expressionsOptional(self, exprs):
641+
def set_source_expressions(self, exprs):
642642
self.path, self.relation, self.geometry = exprs
643643

644644
def search_operator(self, compiler, connection):

tests/atlas_search_/test_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def test_search_geo_within(self):
544544
score=SearchGeoWithin(
545545
path="location",
546546
kind="geometry",
547-
geo_object=polygon,
547+
geometry=polygon,
548548
)
549549
)
550550
self.assertCountEqual(qs.all, [self.article])
@@ -559,7 +559,7 @@ def test_constant_score(self):
559559
score=SearchGeoWithin(
560560
path="location",
561561
kind="geometry",
562-
geo_object=polygon,
562+
geometry=polygon,
563563
score=constant_score,
564564
)
565565
)

0 commit comments

Comments
 (0)