Added prepare_query_value for a couple of fields
This commit is contained in:
parent
ec927bdd63
commit
84d7987108
@ -131,6 +131,9 @@ class EmbeddedDocumentField(BaseField):
|
||||
def lookup_member(self, member_name):
|
||||
return self.document._fields.get(member_name)
|
||||
|
||||
def prepare_query_value(self, value):
|
||||
return self.to_mongo(value)
|
||||
|
||||
|
||||
class ListField(BaseField):
|
||||
"""A list field that wraps a standard field, allowing multiple instances
|
||||
@ -163,6 +166,9 @@ class ListField(BaseField):
|
||||
raise ValidationError('All items in a list field must be of the '
|
||||
'specified type')
|
||||
|
||||
def prepare_query_value(self, value):
|
||||
return self.field.to_mongo(value)
|
||||
|
||||
def lookup_member(self, member_name):
|
||||
return self.field.lookup_member(member_name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user