Bug fix for gridfs FileField.
This commit is contained in:
parent
dcc8d22cec
commit
266f33adc4
@ -600,7 +600,7 @@ class FileField(BaseField):
|
|||||||
|
|
||||||
def to_python(self, value):
|
def to_python(self, value):
|
||||||
# Use stored value (id) to lookup file in GridFS
|
# 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 self.gridfs.get(id=value)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user