-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Empty unit name when importing #2690
Comments
that is very strange, fields should not suddenly become empty. What do you mean by moving fields around, do you mean reordering ingredients or moving them between steps? |
I think it is as simple as,
|
ok thanks, I will take a look at that, that could be the explanaition |
ok so this is actually kind of the expected/intended behavior, the system just does not expect you to open the editor and not enter anything prepareIngredientEditModal: function (step, ingredient) {
if (ingredient.unit === null) {
ingredient.unit = {
"name": ""
}
}
if (ingredient.food === null) {
ingredient.food = {
"name": ""
}
}
this.current_edit_ingredient = ingredient
this.current_edit_step = step
}, but that of course makes sense, you should be able to just leave the unit empty, i fill fix it |
ok so there was actually already a method handling this case but it only triggered when using one of the buttons not the close or clicking in the background. Its now fixed |
Tandoor Version
1.5.6
Setup
Docker / Docker-Compose
Reverse Proxy
Traefik
Other
No response
Bug description
When importing a recipe from a website, and moving fields around, sometimes a non-existing unit is replaced by an empty unit.
Extract from the JSON generated
This particular extract comes from this website, but simply importing the link works immediately. I believe the problem happens when moving ingredients around, before importing.
The API response is a simple 400, indicating that "This field may not be blank" (at the correct place). I've tried entering the ingredient and modifying it, but it doesn't seem possible to simply "delete". I haven't tried manually setting a random unit.
Unfortunately, it's not super easy to reproduce, with clear steps. Happens "sometimes".
Current workaround is to use the browser's console network tab, figure out which ingredient is broken, and delete it altogether from the import. Maybe also simply set a random unit, and delete it afterwards.
Possible solutions:
Relevant logs
No response
The text was updated successfully, but these errors were encountered: