@@ -266,19 +266,7 @@ def _decode_child(self, child):
266
266
raise NotSupportedError ("Pattern lookups on UUIDField are not supported." )
267
267
268
268
rhs , rhs_params = child .process_rhs (self .compiler , self .connection )
269
-
270
269
lookup_type = child .lookup_name
271
-
272
- # Since NoSql databases generally don't support aggregation or
273
- # annotation, pass true unless the query has a get_aggregation() method.
274
- # It's a little troubling however that the _nomalize_lookup_value
275
- # method seems to only use this value in the case that the value is an
276
- # iterable and the lookup_type equals isnull.
277
- annotation = (
278
- self .get_aggregation (using = self .connection )[None ]
279
- if hasattr (self , "get_aggregation" )
280
- else True
281
- )
282
270
value = rhs_params
283
271
packed = child .lhs .get_group_by_cols ()[0 ]
284
272
alias = packed .alias
@@ -299,11 +287,11 @@ def _decode_child(self, child):
299
287
300
288
field = next (f for f in opts .fields if f .column == column )
301
289
302
- value = self ._normalize_lookup_value (lookup_type , value , field , annotation )
290
+ value = self ._normalize_lookup_value (lookup_type , value , field )
303
291
304
292
return field , lookup_type , value
305
293
306
- def _normalize_lookup_value (self , lookup_type , value , field , annotation ):
294
+ def _normalize_lookup_value (self , lookup_type , value , field ):
307
295
"""
308
296
Undo preparations done by lookups not suitable for MongoDB, and pass
309
297
the lookup argument through DatabaseOperations.prep_lookup_value().
@@ -316,7 +304,7 @@ def _normalize_lookup_value(self, lookup_type, value, field, annotation):
316
304
"not to be a list. Only 'in'-filters can be used with "
317
305
"lists." % lookup_type
318
306
)
319
- value = annotation if lookup_type == "isnull" else value [0 ]
307
+ value = value [0 ]
320
308
321
309
# Remove percent signs added by PatternLookup.process_rhs() for LIKE
322
310
# queries.
0 commit comments