Skip to content

Commit d61cbff

Browse files
committed
Add docstring
1 parent 94f7027 commit d61cbff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django_mongodb/compiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,8 @@ def collection_name(self):
442442
if isinstance(v, BaseTable) and self.query.alias_refcount[k]
443443
)
444444
except StopIteration:
445+
# If the query does not have any table, collection '__null' is used
446+
# with one document in order to support subqueries and expressions.
445447
query = self.query_class(self)
446448
query.aggregation_pipeline = [{"$facet": {"__null": []}}]
447449
self.subqueries.insert(0, query)

0 commit comments

Comments
 (0)