base_attachment_storage: _register_hook do nothing if it is disabled

This commit is contained in:
Denis Leemann committed 2023-08-22 17:29:54 +02:00
1 parent 0d0ca60710
commit 17a924f862
1 file changed
+1 -1
@@ -79,7 +79,7 @@ class IrAttachment(models.Model):
# migration here.
# Typical example is images of ir.ui.menu which are updated in
# ir.attachment at every upgrade of the addons
if update_module:
if update_module and not self.is_storage_disabled(location):
self.env["ir.attachment"].sudo()._force_storage_to_object_storage()
@property
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.