Open salco opened 1 month ago
Just came to post the same bug. I found this when trying to delete Food Data for an item that was in a shopping list.
I think the UI should offer to delete the referencing shopping list entry and perhaps specify which shopping list is referencing the ingredient.
Mealie 1.7.0 for me.
Deleting foods should just work, it shouldn't get caught up by foreign key issues.
Ideally when deleting foods, existing shopping list items are either deleted, or their food is converted to a note before deletion. Ingredients should probably do this too as along as we're adding custom food deletion logic.
But in my case it's not deleting but updating since I'm merging one keyword into another. If the food is a key can we not just change it for the new one, one way or another?
First Check
What is the issue you are experiencing?
If you want to merge an ingredient that is already used inside a shopping list nothing is show to the user and it doesnt work.
In reality we get a http response: 500 when we look at the network log.
Also if we look at the database (for me it's postgres) you see that the error is:
To confirm: I've deleted the shopping list in question and retry the merge and all went well.
Steps to Reproduce
tomayto
andtomato
tomayto
the other usingtomato
api/foods/merge
and mergetomayto
intotomato
Voila you should get the response 500 in the browser logs.
Please provide relevant logs
Mealie Version
1.6.0
Deployment
Docker (Linux)
Additional Deployment Details
Details Version: v1.6.0 Build: 418a8ec72bead3f625827846aafd644c851a4fcc Mode de l'application: Production Mode démo: Non démo Port de l'API: 9000 Documentation de l'API: Activé Type de base de données: postgres Version du Scraper de recette: 14.56.0
Checks Site sécurisé: Oui URL de base côté serveur: Oui Prêt pour LDAP: Non Prêt pour OIDC: Non Courriel configuré: Non