Skip to content

Commit c74a038

Browse files
committed
Docstring.
1 parent 4e294c2 commit c74a038

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

django_mongodb/compiler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,12 @@ def _get_ordering(self):
471471
idx = itertools.count(start=1)
472472
for order in self.order_by_expressions or []:
473473
if isinstance(order.expression, Ref):
474-
# TODO change?
475-
# field_name = order.expression.as_mql(self, self.connection).removeprefix("$")
476-
# extra_fields[field_name] = order.expression
477474
field_name = order.expression.refs
478475
elif isinstance(order.expression, Col):
479476
field_name = order.expression.as_mql(self, self.connection).removeprefix("$")
480477
fields[field_name] = order.expression
481478
else:
482-
# The expression must be added to extra_fields with an alias.
479+
# The expression must be added to fields with an alias.
483480
field_name = f"__order{next(idx)}"
484481
fields[field_name] = order.expression
485482
# If the expression is ordered by NULLS FIRST or NULLS LAST,

0 commit comments

Comments
 (0)