mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
base_attachment_storage: _register_hook do nothing if it is disabled
This commit is contained in:
@@ -59,7 +59,7 @@ class IrAttachment(models.Model):
|
||||
super()._register_hook()
|
||||
location = self.env.context.get("storage_location") or self._storage()
|
||||
# ignore if we are not using an object storage
|
||||
if location not in self._get_stores():
|
||||
if self.is_storage_disabled(location) or location not in self._get_stores():
|
||||
return
|
||||
curframe = inspect.currentframe()
|
||||
calframe = inspect.getouterframes(curframe, 2)
|
||||
|
||||
Reference in New Issue
Block a user