-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Automatically unselect images when source image is deleted #10692
fix: Automatically unselect images when source image is deleted #10692
Conversation
if ($move_to eq 'trash') { | ||
foreach my $related_img (keys %{$product_ref->{images}}) { | ||
if ($product_ref->{images}{$related_img}{imgid} eq $imgid) { | ||
_process_image_unselect($product_ref, $related_img); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to unselect the image, but we also want to move the selected image files (similar to the source file with the code above) so that they are not visible online any longer as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I made changes. I use a queue for the images to be moved and If an image has to be unselected because the source is trashed, we add it to the queue to trash it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thank you!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10692 +/- ##
==========================================
- Coverage 49.54% 49.35% -0.20%
==========================================
Files 67 77 +10
Lines 20650 22025 +1375
Branches 4980 5261 +281
==========================================
+ Hits 10231 10870 +639
- Misses 9131 9827 +696
- Partials 1288 1328 +40 ☔ View full report in Codecov by Sentry. |
f6b883b
to
dc0c3be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
/lint |
/update_tests_results |
Quality Gate passedIssues Measures |
🤖 I have created a release *beep* *boop* --- ## [2.41.0](v2.40.0...v2.41.0) (2024-08-13) ### Features * generate historical events from product revisions ([#10523](#10523)) ([42508e1](42508e1)) * sync number of product public/pro in CRM ([#10684](#10684)) ([026ff6a](026ff6a)) ### Bug Fixes * 3 fixes to make /products/[code1],[code2] work again ([#10669](#10669)) ([7fc07fc](7fc07fc)) * Automatically unselect images when source image is deleted ([#10692](#10692)) ([588897a](588897a)) * **docs:** correct OpenAPI definition by fixing missing reference ([#10659](#10659)) ([4f0f10e](4f0f10e)) * gen_users_emails.pl ([#10686](#10686)) ([00e4c26](00e4c26)) * Show missing nutrients in Nutri-Score panel ([#10655](#10655)) ([a1b11eb](a1b11eb)) * UTM mobile ([#10665](#10665)) ([965041d](965041d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
What
Automatically unselect images when source image is deleted
Related issue(s) and discussion