Fixed mealplan-shadow recipe handling when removing an meal plan entry (references #1391)

This commit is contained in:
Bernd Bestel 2021-07-10 20:51:20 +02:00
parent 2847908523
commit 6660e1ff73
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -162,7 +162,7 @@ BEGIN
-- Remove shadow recipes per meal plan recipe
DELETE FROM recipes
WHERE type = 'mealplan-shadow'
AND name NOT IN (SELECT CAST(OLD.day AS TEXT) || '#' || CAST(id AS TEXT) FROM meal_plan WHERE type = 'recipe');
AND name NOT IN (SELECT CAST(day AS TEXT) || '#' || CAST(id AS TEXT) FROM meal_plan WHERE type = 'recipe');
END;
CREATE TRIGGER update_internal_recipe AFTER UPDATE ON meal_plan