You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
From time to time, when manually adding foods to my local database, I get an error because the energy sum is not within the tolerance margin (+/-15%), and yet I rely on the food label, for example the latest "artichoke heart"
In the "ingredient.py" file we can see:
if not ((energy_upper > energy_calculated) and (energy_calculated > energy_lower)):
raise ValidationError(
_(
f'The total energy ({self.energy}kcal) is not the approximate sum of the '
f'energy provided by protein, carbohydrates and fat ({energy_calculated}kcal'
f' +/-{self.ENERGY_APPROXIMATION}%)'
)
)
Would it be possible to have an option to force the addition despite this restriction by a checkbox or other?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
From time to time, when manually adding foods to my local database, I get an error because the energy sum is not within the tolerance margin (+/-15%), and yet I rely on the food label, for example the latest "artichoke heart"
In the "ingredient.py" file we can see:
if not ((energy_upper > energy_calculated) and (energy_calculated > energy_lower)):
raise ValidationError(
_(
f'The total energy ({self.energy}kcal) is not the approximate sum of the '
f'energy provided by protein, carbohydrates and fat ({energy_calculated}kcal'
f' +/-{self.ENERGY_APPROXIMATION}%)'
)
)
Would it be possible to have an option to force the addition despite this restriction by a checkbox or other?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions