Update base_attachment_object_storage/models/ir_attachment.py

This commit is contained in:
Guewen Baconnier
2019-06-04 13:19:17 +02:00
committed by GitHub
co-authored by GitHub
parent 3a269ce879
commit d48a418490
@@ -316,7 +316,7 @@ class IrAttachment(models.Model):
# write them back in the DB (the logic for location to write is # write them back in the DB (the logic for location to write is
# in the 'datas' inverse computed field) # in the 'datas' inverse computed field)
attachment.write({'datas': attachment.datas}) attachment.write({'datas': attachment.datas})
# as the file will potentially be dropped on the bucket, # as the file will potentially be deleted from the bucket,
# we should commit the changes here # we should commit the changes here
new_env.cr.commit() new_env.cr.commit()
if current % 100 == 0 or total - current == 0: if current % 100 == 0 or total - current == 0: