Skip to content
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

disallow edits from apps to product data and images sent by manufacturers #1811

Merged
merged 1 commit into from
May 29, 2019

Conversation

stephanegigandet
Copy link
Contributor

Copy link
Member

@hangy hangy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know ... this silently discards user input (from apps), and returns status: ok in the case of image crop. It would be better to at least communicate the problem with the caller, so that they know that their data has not been saved.

@VaiTon
Copy link
Member

VaiTon commented May 27, 2019

It would be better to at least communicate the problem with the caller, so that they know that their data has not been saved.

I strongly agree with that

@stephanegigandet
Copy link
Contributor Author

The thing is that the current API does not have a feedback mechanism to indicate that some fields were saved and some were not. And we do not want apps to resubmit the data. Returning something else than the current status: ok response is likely to have unwanted behavior in some apps (like not being able to submit a product).

Let me provide some context: we have 12 000 products (and growing) with data like ingredients and nutrition facts that has been provided by producers (and that is almost always correct). And we have bogus data that overwrite this data. In particular there are some bugs in the offline mode of the OFF apps that make ingredients and nutritions facts being erased.

So while I agree that the silent ignore is not ideal, it's bad data that is being ignored. I think it's time that we define a new version of the API, and this time we should incorporate a better feedback mechanism (like which fields were saved, or rejected and why).

@hangy
Copy link
Member

hangy commented May 27, 2019

So while I agree that the silent ignore is not ideal, it's bad data that is being ignored.

Oh, that's a bad situation ... and rejecting the whole edit might also be not too good for contributors ...

I think it's time that we define a new version of the API, and this time we should incorporate a better feedback mechanism (like which fields were saved, or rejected and why).

Feel free to jump in on #1687 😉

@stephanegigandet stephanegigandet merged commit 3721cce into master May 29, 2019
@hangy
Copy link
Member

hangy commented Jun 21, 2019

So while I agree that the silent ignore is not ideal, it's bad data that is being ignored.

Oh, that's a bad situation ... and rejecting the whole edit might also be not too good for contributors ...

I just stumbled upon this again while skimming the source, and was confused why it was done this way, again. 😆 To be honest, it's potentially bad data being ignored. The apps that write data using the API might very well be providing corrections/improvements to the data provided by a producer. Silently discarding parts of the edits might drive well-behaved, motivated contributors away.

@VaiTon VaiTon deleted the issue-1810/protect-manufacturer-data branch December 14, 2019 10:19
@teolemon teolemon added the 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants