Please add the following information to your pull request:
Please describe what your PR is fixingkcal_equivalent would crash if kcal can't exactly be made out of items in KCAL_TABLE, now the function won't crash anymore. I also fixed a small spelling mistake for mayonnaise and added a handful of simple tests
Concretely, which issues does your PR solve? (Please reference them by typing Fixes/References Inter-Actief/amelie#<issue_id>)
Fixes Inter-Actief/amelie#830
Does your PR change how we process personal data, impact our privacy document, or modify (one of) our data export(s)?
no
Does your PR include any django migrations?
no
Does your PR include the proper translations (did you add translations for new/modified strings)?
yes, I have included the translations
Does your PR include CSS changes (and did you run the compile_css.sh script in the scripts directory to regenerate the compiled.css file)?
no, my PR does not include CSS changes
Does your PR need external actions by for example the System Administrators? (Think about new pip packages, new (local) settings, a new regular task or cronjob, new management commands, etc.)?
no
Did you properly test your PR before submitting it?
yes
It's been a while since I has to write idiomatic Python code, I hope this is not too bad :sweat_smile:. A PEP8 formatter was used, though I don't think this makes things more readable...
Please add the following information to your pull request:
Please describe what your PR is fixing
kcal_equivalent
would crash ifkcal
can't exactly be made out of items inKCAL_TABLE
, now the function won't crash anymore. I also fixed a small spelling mistake for mayonnaise and added a handful of simple testsConcretely, which issues does your PR solve? (Please reference them by typing
Fixes/References Inter-Actief/amelie#<issue_id>
) Fixes Inter-Actief/amelie#830Does your PR change how we process personal data, impact our privacy document, or modify (one of) our data export(s)? no
Does your PR include any django migrations? no
Does your PR include the proper translations (did you add translations for new/modified strings)? yes, I have included the translations
Does your PR include CSS changes (and did you run the
compile_css.sh
script in thescripts
directory to regenerate thecompiled.css
file)? no, my PR does not include CSS changesDoes your PR need external actions by for example the System Administrators? (Think about new pip packages, new (local) settings, a new regular task or cronjob, new management commands, etc.)? no
Did you properly test your PR before submitting it? yes
It's been a while since I has to write idiomatic Python code, I hope this is not too bad :sweat_smile:. A PEP8 formatter was used, though I don't think this makes things more readable...