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

[BUG] - Removing a recipe ingredient doesn't remove its links to steps #3956

Open
6 tasks done
YodaDaCoda opened this issue Jul 29, 2024 · 6 comments
Open
6 tasks done
Labels
bug: confirmed bug Something isn't working

Comments

@YodaDaCoda
Copy link

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

When a recipe ingredient is removed from the recipe, any recipe-step links for that ingredient are not removed from the steps.

Steps to Reproduce

  1. Create a new recipe or edit an existing one
  2. Link an ingredient to a step
  3. Remove the ingredient from the recipe
  4. Open the ingredient's JSON and observe that there exists an ingredientReferences on the step without a corresponding recipeIngredient.

Please provide relevant logs

N/A

Mealie Version

v1.10.2

Deployment

Docker (Linux)

Additional Deployment Details

No response

@YodaDaCoda YodaDaCoda added bug Something isn't working triage labels Jul 29, 2024
@YodaDaCoda
Copy link
Author

I discovered this when the Mealient app for Android wouldn't display one of my recipes after editing it. While I do think Mealient should handle this situation more gracefully, Mealie should avoid this in the first place.

kirmanak/Mealient#284

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2024
@YodaDaCoda
Copy link
Author

Can this be re-opened?

@Kuchenpirat Kuchenpirat reopened this Sep 4, 2024
@github-actions github-actions bot removed the stale label Sep 5, 2024
Copy link
Contributor

github-actions bot commented Oct 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 5, 2024
@YodaDaCoda
Copy link
Author

I tried to figure out how to do this some weeks ago but couldn't see a clear path where I might make changes. Happy to try again with some direction?

@michael-genson
Copy link
Collaborator

You'll probably want to add a check in the recipe service upon updating to remove any ingredient links for non-existent ingredients:

https://github.com/mealie-recipes/mealie/blob/mealie-next/mealie/services/recipe/recipe_service.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants