Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
654cca82a9 |
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class GridFSStorage(Storage):
|
||||||
"""Find the documents in the store with the given name
|
"""Find the documents in the store with the given name
|
||||||
"""
|
"""
|
||||||
docs = self.document.objects
|
docs = self.document.objects
|
||||||
doc = [d for d in docs if getattr(d, self.field).name == name]
|
doc = [d for d in docs if hasattr(getattr(d, self.field), 'name') and getattr(d, self.field).name == name]
|
||||||
if doc:
|
if doc:
|
||||||
return doc[0]
|
return doc[0]
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue