openfoodfacts/openfoodfacts-server

Move all images to the deleted folder when product is deleted without deleting individual images first

Open

#9,794 opened on 2024年2月13日

GitHub で見る
 (8 comments) (1 reaction) (0 assignees)Perl (477 stars) (236 forks)batch import
good first issue👮 Moderation

説明

What

  • Move all images to the deleted folder when product is deleted without deleting individual images first

Why

Code pointers

  • Related code is in lib/ProductOpener/Product.pm + Images.pm
  • To delete a product, you have to be an admin. Create a user in your local product opener website (use the Sign-in button), then in lib/ProductOpener/Config_off.pm add your userid.
  • Removing an image is calling process_image_move with "trash" as destination
  • Removing a product is about setting $product_ref->{deleted} to 'on', so image removal should happen in store_product, after initial checks, when we see it is deleted.

コントリビューターガイド