mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 16:48:36 +00:00
Return empty result on file read error
This is how the core implementation works
This commit is contained in:
@@ -63,9 +63,9 @@ class IrAttachment(models.Model):
|
|||||||
swifturi.item())
|
swifturi.item())
|
||||||
read = base64.b64encode(obj_content)
|
read = base64.b64encode(obj_content)
|
||||||
except ClientException:
|
except ClientException:
|
||||||
|
read = ''
|
||||||
_logger.exception(
|
_logger.exception(
|
||||||
'Error reading object from Swift object store')
|
'Error reading object from Swift object store')
|
||||||
raise exceptions.UserError(_('Error reading on Swift'))
|
|
||||||
return read
|
return read
|
||||||
else:
|
else:
|
||||||
return super(IrAttachment, self)._store_file_read(fname, bin_size)
|
return super(IrAttachment, self)._store_file_read(fname, bin_size)
|
||||||
|
|||||||
Reference in New Issue
Block a user