Skip to content

Commit

Permalink
[FIX] computing image must be done in sudo
Browse files Browse the repository at this point in the history
Indeed computing image can generate thumbnail and the api user may not have the access right for it
  • Loading branch information
sebastienbeau authored and Pierrick Brun committed Mar 15, 2021
1 parent b395569 commit 05dab75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shopinvader_image/models/shopinvader_image_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class ShopinvaderImageMixin(models.AbstractModel):
_description = "Shopinvader Image Mixin"
_image_field = None

images = Serialized(compute="_compute_images", string="Shopinvader Image")
images = Serialized(
compute="_compute_images",
string="Shopinvader Image",
compute_sudo=True,
)
# Tech field to store images data.
# It cannot be computed because the computation
# might required generating thumbs
Expand Down

0 comments on commit 05dab75

Please sign in to comment.