Merge branch 'fix/queryTransform' of git://github.com/hiimdoublej/mongoengine into hiimdoublej-fix/queryTransform
This commit is contained in:
@@ -773,6 +773,9 @@ class EmbeddedDocumentField(BaseField):
|
||||
|
||||
def prepare_query_value(self, op, value):
|
||||
if value is not None and not isinstance(value, self.document_type):
|
||||
# Short circuit for special operators, returning them as is
|
||||
if isinstance(value, dict) and all(k.startswith('$') for k in value.keys()):
|
||||
return value
|
||||
try:
|
||||
value = self.document_type._from_son(value)
|
||||
except ValueError:
|
||||
|
||||
Reference in New Issue
Block a user