Skip to content

Commit 82dacce

Browse files
NoahStappWaVEV
andauthored
Update django_mongodb_backend/gis/lookups.py
Co-authored-by: Emanuel Lupi <emanuel.lupi91@gmail.com>
1 parent 0ba8409 commit 82dacce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_mongodb_backend/gis/lookups.py

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

66

77
def gis_lookup(self, compiler, connection, as_expr=False):
8-
if as_expr:
8+
if as_expr or not self.can_use_path:
99
raise NotSupportedError("MongoDB does not support GIS lookups in expressions.")
1010
lhs_mql = process_lhs(self, compiler, connection, as_expr=as_expr)
1111
rhs_mql = process_rhs(self, compiler, connection, as_expr=as_expr)

0 commit comments

Comments
 (0)