wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.1k stars 579 forks source link

The total energy (kcal) is not the approximate sum of the energy provided by protein, carbohydrates and fat (kcal +/-15%) #1347

Open daufinsyd opened 1 year ago

daufinsyd commented 1 year ago

Steps to Reproduce

Hello ! When trying to enter some ingredients (ham) I got the following message

The total energy (109kcal) is not the approximate sum of the energy provided by protein, carbohydrates and fat (55.2kcal +/-15%)

The ham I try to enter is like this one https://www.herta.fr/produits/jambons-blancs/bon-paris/herta-bon-paris-jambon-a-etouffee-x4-170g

Expected results:

I can bypass the message (at least on selfhosted instances) to create the ingredient

Actual results:

The total energy (109kcal) is not the approximate sum of the energy provided by protein, carbohydrates and fat (55.2kcal +/-15%)
rolandgeider commented 1 year ago

Hi!

the calculated energy should have enough leeway to allow all real products but catch typos or so. That being said, I would suggest adding missing products to Open Food Facts, which is where we import most of the data from

daufinsyd commented 1 year ago

hi @rolandgeider Thanks for your quick response !

I'm using a self hosted instance (just trying for now), Actually I prefer not syncing from open food fact so that I only see ingredients I consume.

I understand that you don't want to have custom edge cases in ingredients, hence I thought there could be a variable to bypass the check (since you chose django (great choice btw ;) ) I could try to make a PR but not sure I would do it the way you'd like ^^) Tho if the ingredient is valid for OpenFoodFact shouldn't it be valid for the app ?

Actually my workflow/goal using the app is not to know that the tuna I ate had exactly 28.5g Proteines and not 29.8g but that I ate tuna which contains around 29g Proteines.

Baggypants commented 3 months ago

A) you are already allowing people to track only calories in the nutrition diary. Why force them to input data they don't care about into self hosted servers.

B) some labels don't have that info. You're asking people to make up numbers anyway.

C) If data from openfoodfacts is already garbage, why allow that into the local data and not locally added data?