Bug fix for gridfs FileField.
This commit is contained in:
@@ -600,7 +600,7 @@ class FileField(BaseField):
|
||||
|
||||
def to_python(self, value):
|
||||
# Use stored value (id) to lookup file in GridFS
|
||||
if self.gridfs.grid_id is not None:
|
||||
if value is not None:
|
||||
return self.gridfs.get(id=value)
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user