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

fix: 4627 - no more nutrients wiped out #4902

Merged
merged 3 commits into from
Dec 16, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • 2 bugs fixed in this PR.
  • Minor fixed bug: there was a "cannot load" error that prevented the user from entering the nutrition facts page the very first time (then it was OK).
  • The "Empty nutrition facts" bug is also fixed here:
    • when background tasks are piling up, we sent the request to the server and meanwhile we compute the local product as the initial product with all the local-and-not-server-committed changes on top.
    • the problem was that in those changes we overwrote existing nutrition facts with empty nutrition facts (from a product change that had no nutrition facts and it was transformed into existing but empty nutrition facts).

Fixes bug(s)

Impacted files

Impacted files:
* `ordered_nutrients_cache.dart`: removed a bug I introduced in openfoodfacts#4768.
* `up_to_date_changes.dart`: now nutriments are safer when background tasks are running.
@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b101d75) 9.67% compared to head (627f6bd) 9.67%.

Files Patch % Lines
...smooth_app/lib/data_models/up_to_date_changes.dart 0.00% 1 Missing ⚠️
...app/lib/pages/product/ordered_nutrients_cache.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #4902   +/-   ##
=======================================
  Coverage     9.67%   9.67%           
=======================================
  Files          318     318           
  Lines        16115   16115           
=======================================
  Hits          1559    1559           
  Misses       14556   14556           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@g123k g123k left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@teolemon teolemon merged commit e5757e7 into openfoodfacts:develop Dec 16, 2023
6 checks passed
@teolemon
Copy link
Member

Thanks @monsieurtanuki and @g123k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nutrition input issues
4 participants