Skip to content

Commit e1042f5

Browse files
committed
Remove autocast fields in join.
1 parent 79f2b85 commit e1042f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_mongodb/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def join(self, compiler, connection):
153153
# The pipeline variables to be matched in the pipeline's
154154
# expression.
155155
"let": {
156-
f"{parent_template}{i}": {"$toString": parent_field}
156+
f"{parent_template}{i}": parent_field
157157
for i, parent_field in enumerate(lhs_fields)
158158
},
159159
"pipeline": [
@@ -167,7 +167,7 @@ def join(self, compiler, connection):
167167
"$match": {
168168
"$expr": {
169169
"$and": [
170-
{"$eq": [f"$${parent_template}{i}", {"$toString": field}]}
170+
{"$eq": [f"$${parent_template}{i}", field]}
171171
for i, field in enumerate(rhs_fields)
172172
]
173173
+ extra_condition

0 commit comments

Comments
 (0)