Closed stephanegigandet closed 1 year ago
Working on this! Could you pls tell me the relevant code file to make desired changes :')
Related code: probably in lib/ProductOpener/Import.pm there are test files t/integration/import_csv_file.t
fields that should be protected should be configured in Config_off.pm, at the beginning it will be allergens and traces, but we might add other fields later.
The usual behaviour for "tags" fields such as categories, labels, countries, allergens etc. is that values supplied by producers are added to any existing value entered by users (e.g. producers might sent us only the "Organic" label while we may have more precise labels and mentions such as "AB Organic" or "Rich in fiber").
For allergens and traces though, if the producer sends a value, we can assume that the value is complete, and that it can replace entirely any pre-existing value.
We need to do 2 things:
Related to https://github.com/openfoodfacts/openfoodfacts-server/issues/7850
Part of
5521