Merge branch 'master' into Fix_update_full_result_documentation

This commit is contained in:
erdenezul
2019-02-18 09:31:00 +08:00
committed by GitHub
5 changed files with 171 additions and 77 deletions

View File

@@ -1483,6 +1483,12 @@ class BinaryField(BaseField):
if self.max_bytes is not None and len(value) > self.max_bytes:
self.error('Binary value is too long')
def prepare_query_value(self, op, value):
if value is None:
return value
return super(BinaryField, self).prepare_query_value(
op, self.to_mongo(value))
class GridFSError(Exception):
pass