File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,9 @@ class MongoQuery:
43
43
44
44
def __init__ (self , compiler ):
45
45
self .compiler = compiler
46
- self .connection = compiler .connection
47
- self .ops = compiler .connection .ops
48
46
self .query = compiler .query
49
- self ._negated = False
50
47
self .ordering = []
51
- self .collection_name = self .compiler .collection_name
52
- self .mongo_query = getattr (compiler .query , "raw_query" , {})
48
+ self .mongo_query = {}
53
49
self .subqueries = None
54
50
self .lookup_pipeline = None
55
51
self .project_fields = None
@@ -63,7 +59,8 @@ def __init__(self, compiler):
63
59
@cached_property
64
60
def collection (self ):
65
61
# Initialize this lazily since `compiler.collection` connects to the
66
- # database.
62
+ # database and a connection isn't needed if the query raises
63
+ # EmptyResultSet.
67
64
return self .compiler .collection
68
65
69
66
def __repr__ (self ):
You can’t perform that action at this time.
0 commit comments