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

Converting an ingredient to a header does not remove the food from the recipe #1997

Closed
AmaranthineCodices opened this issue Aug 20, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@AmaranthineCodices
Copy link

Tandoor Version

1.3.3

Setup

Docker / Docker-Compose

Reverse Proxy

Traefik

Other

No response

Bug description

I have a series of recipes that I imported from Paprika. In Paprika, there are recipe headers in the ingredients; in Tandoor, these have been imported as Markdown-bolded ingredients:
image

This isn't ideal, as these aren't actual foods! When I convert them to section headers manually by editing the recipe, however, they continue to exist in the foods list and are attributed to the recipe that previously contained them. There's no way to actually remove these as foods, so they appear in the suggestions box and are generally in the way.

Here's an image of the foods list showing the section header that's been attached to the recipe:
image

Here's what the "Test" recipe actually looks like:
image

It's worth noting that this is not an issue with the Paprika import functionality (though perhaps the importer shouldn't be doing this to the ingredient section headers); you can replicate this bug purely in Tandoor without importing any data. Below are reproduction steps for producing this inconsistency without importing anything.

Reproduction steps

  • Create a new recipe. Add an ingredient, call it whatever you want (I used **Test header** when verifying this).
  • Save the recipe.
  • Edit the recipe. Convert the ingredient to a header, removing it as an ingredient in the process.
  • Save the recipe again.
  • Check the Foods list. You'll notice that the original ingredient name is still there, and is still associated with the recipe. You cannot delete the food, because it's still in use, even though the recipe doesn't actually reference the food anymore.

Relevant logs

No response

@vabene1111
Copy link
Collaborator

Thanks for the detailed report, need to clean that code up properly.

@vabene1111 vabene1111 added the bug Something isn't working label Sep 3, 2022
@vabene1111 vabene1111 added this to the 1.3.0 milestone Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants