Skip to content

Commit 5fb1c55

Browse files
sebastienbeauPierrick Brun
authored andcommitted
[FIX] computing image must be done in sudo
Indeed computing image can generate thumbnail and the api user may not have the access right for it
1 parent 4a3d25e commit 5fb1c55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shopinvader_image/models/shopinvader_image_mixin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ class ShopinvaderImageMixin(models.AbstractModel):
1010
_description = "Shopinvader Image Mixin"
1111
_image_field = None
1212

13-
images = fields.Serialized(compute="_compute_image", string="Shopinvader Image")
13+
images = fields.Serialized(
14+
compute="_compute_image",
15+
string="Shopinvader Image",
16+
compute_sudo=True,
17+
)
1418

1519
def _compute_image(self):
1620
# Note: this computed field depend on the lang used in the context

0 commit comments

Comments
 (0)