[FIX] product: image changes not sticking everywhere
Fixes #20046
Simply reverting e5ef1c5917 looks to
work *but* since I didn't note the repro case for the issue and don't
remember what it was it may re-introduce previous breakage. Instead,
ensure all "sizes" for the image are reset if any of the sizes is
present *and* Falsy by adding a final case to the conditional.
If any of the image fields is present and non-falsy one of the
previous branches will be taken, so we can just check that any of the
image fields is present at all (this implies it's falsy).
This commit is contained in:
@@ -282,6 +282,8 @@ def image_resize_images(vals, big_name='image', medium_name='image_medium', smal
|
||||
return_big=True, return_medium=True, return_small=True,
|
||||
big_name=big_name, medium_name=medium_name, small_name=small_name,
|
||||
avoid_resize_big=True, avoid_resize_medium=True, avoid_resize_small=True))
|
||||
elif big_name in vals or medium_name in vals or small_name in vals:
|
||||
vals[big_name] = vals[medium_name] = vals[small_name] = False
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
|
||||
Reference in New Issue
Block a user