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

Nutrients not imported when servingSize is not set #3358

Open
nomad-debugger opened this issue Oct 12, 2024 · 1 comment
Open

Nutrients not imported when servingSize is not set #3358

nomad-debugger opened this issue Oct 12, 2024 · 1 comment
Labels
enhancement New feature or request [feat] App Import application importers [feat] URL Import URL importer and parser related issues

Comments

@nomad-debugger
Copy link

Tandoor Version

1.5.20

Setup

Docker / Docker-Compose

Reverse Proxy

Nginx Proxy Manager (NPM)

Other

No response

Bug description

When importing a recipe that does not get nutrients.servingSize set, Tandoor throws an exception and the nutrients do not get imported at all. Perhaps Tandoor can fall back to a serving size of 1 (because nutrient value most commonly refers to 1 serving) or ask the user to define this, to ensure the nutrients are not lost on import.

I've also come across a recipe that had the servingSize set to 1.5 cups (because one serving is 1.5 cup) which Tandoor then parses into 1.5 servings.

Relevant logs

'property_amount': parse_servings(property_data[properties[p]]) / parse_servings(property_data['servingSize'])

It throws a key error on servingSize.
@vabene1111
Copy link
Collaborator

sounds reasonable, there should be some more parsing/verifying done there.

@vabene1111 vabene1111 added enhancement New feature or request [feat] App Import application importers [feat] URL Import URL importer and parser related issues labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request [feat] App Import application importers [feat] URL Import URL importer and parser related issues
Projects
None yet
Development

No branches or pull requests

2 participants