fix(s3): check whether key is None or not to avoid exception.
``` AttributeError: 'NoneType' object has no attribute 'multipart' ```
This commit is contained in:
parent
4da9ec1346
commit
98f33740e1
2 changed files with 13 additions and 1 deletions
|
|
@ -1107,7 +1107,7 @@ class S3Backend(BaseBackend):
|
|||
key = key_version
|
||||
break
|
||||
|
||||
if part_number and key.multipart:
|
||||
if part_number and key and key.multipart:
|
||||
key = key.multipart.parts[part_number]
|
||||
|
||||
if isinstance(key, FakeKey):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue