Skip to content

Commit dfad564

Browse files
committed
Revert handle subquery pipeline as a different pipeline.
1 parent 0a48a79 commit dfad564

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

django_mongodb/query.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def get_cursor(self):
7070
return self.collection.aggregate(self.get_pipeline())
7171

7272
def get_pipeline(self):
73-
subquery_pipeline = self.subquery.get_pipeline() if self.subquery else []
74-
pipeline = []
73+
pipeline = self.subquery.get_pipeline() if self.subquery else []
7574
if self.lookup_pipeline:
7675
pipeline.extend(self.lookup_pipeline)
7776
if self.mongo_query:
@@ -90,8 +89,7 @@ def get_pipeline(self):
9089
pipeline.append({"$skip": self.query.low_mark})
9190
if self.query.high_mark is not None:
9291
pipeline.append({"$limit": self.query.high_mark - self.query.low_mark})
93-
94-
return subquery_pipeline + pipeline
92+
return pipeline
9593

9694

9795
def join(self, compiler, connection):

0 commit comments

Comments
 (0)