Skip to content

Commit c0a239e

Browse files
WaVEVtimgraham
authored andcommitted
Remove redefinition of contained_by
1 parent e2cdfe9 commit c0a239e

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
@@ -195,23 +195,6 @@ def as_mql(self, compiler, connection):
195195
}
196196

197197

198-
@_EmbeddedModelArrayOutputField.register_lookup
199-
class ArrayContainedBy(EmbeddedModelArrayFieldBuiltinLookup, Lookup):
200-
lookup_name = "contained_by"
201-
get_db_prep_lookup_value_is_iterable = False
202-
203-
def as_mql(self, compiler, connection):
204-
lhs_mql = process_lhs(self, compiler, connection)
205-
value = process_rhs(self, compiler, connection)
206-
return {
207-
"$and": [
208-
{"$ne": [lhs_mql, None]},
209-
{"$ne": [value, None]},
210-
{"$setIsSubset": [lhs_mql, value]},
211-
]
212-
}
213-
214-
215198
class KeyTransform(Transform):
216199
def __init__(self, key_name, array_field, *args, **kwargs):
217200
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)