Skip to content

Commit 7638442

Browse files
committed
Edits.
1 parent a932c44 commit 7638442

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

django_mongodb/compiler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ def _get_group_alias_column(self, expr, annotation_group_idx):
3939
col = expr
4040
else:
4141
alias = f"__annotation_group{next(annotation_group_idx)}"
42-
col_expr = self._get_column_from_expression(expr, alias)
43-
replacement = col_expr
44-
col = col_expr
42+
col = self._get_column_from_expression(expr, alias)
43+
replacement = col
4544
if self.collection_name == col.alias:
4645
return col.target.column, replacement
4746
return f"{col.alias}{self.GROUP_SEPARATOR}{col.target.column}", replacement
@@ -349,7 +348,6 @@ def build_query(self, columns=None):
349348
query.project_fields = self.get_project_fields(columns, ordering=query.ordering)
350349
try:
351350
where = self.get_where()
352-
# where = getattr(self, "where", self.query.where)
353351
query.mongo_query = (
354352
{"$expr": where.as_mql(self, self.connection)} if where is not None else {}
355353
)

0 commit comments

Comments
 (0)