diff --git a/base_attachment_object_storage/models/ir_attachment.py b/base_attachment_object_storage/models/ir_attachment.py index e8b17f5..b730a3d 100644 --- a/base_attachment_object_storage/models/ir_attachment.py +++ b/base_attachment_object_storage/models/ir_attachment.py @@ -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)