Allowing export projects even if any attachment doesn't exist in the storage
parent
2946394b7c
commit
440b4e7936
|
@ -111,6 +111,7 @@ def render_project(project, outfile, chunk_size = 8190):
|
||||||
|
|
||||||
# We write the attached_files by chunks so the memory used is not increased
|
# We write the attached_files by chunks so the memory used is not increased
|
||||||
attachment_file = attachment.attached_file
|
attachment_file = attachment.attached_file
|
||||||
|
if default_storage.exists(attachment_file.name):
|
||||||
with default_storage.open(attachment_file.name) as f:
|
with default_storage.open(attachment_file.name) as f:
|
||||||
while True:
|
while True:
|
||||||
bin_data = f.read(chunk_size)
|
bin_data = f.read(chunk_size)
|
||||||
|
|
Loading…
Reference in New Issue