Skip to content

Commit 693736f

Browse files
committed
Remove redefinition of contained_by
1 parent e40bea8 commit 693736f

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

django_mongodb_backend/fields/embedded_model_array.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,6 @@ def as_mql(self, compiler, connection):
183183
}
184184

185185

186-
@_EmbeddedModelArrayOutputField.register_lookup
187-
class ArrayContainedBy(EmbeddedModelArrayFieldBuiltinLookup, Lookup):
188-
lookup_name = "contained_by"
189-
get_db_prep_lookup_value_is_iterable = False
190-
191-
def as_mql(self, compiler, connection):
192-
lhs_mql = process_lhs(self, compiler, connection)
193-
value = process_rhs(self, compiler, connection)
194-
return {
195-
"$and": [
196-
{"$ne": [lhs_mql, None]},
197-
{"$ne": [value, None]},
198-
{"$setIsSubset": [lhs_mql, value]},
199-
]
200-
}
201-
202-
203186
class KeyTransform(Transform):
204187
def __init__(self, key_name, array_field, *args, **kwargs):
205188
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)