mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-28 13:05:26 -05:00
Fix/issue#2003 - Unable to remove all instructions/ingredients from a recipe (#2008)
* Fix issue where recipes could not have all their ingredients/instructions removed * Add test for removing all instructions and ingredients from a recipe
This commit is contained in:
@@ -146,10 +146,10 @@ class RecipeModel(SqlAlchemyBase, BaseMixins):
|
||||
) -> None:
|
||||
self.nutrition = Nutrition(**nutrition) if nutrition else Nutrition()
|
||||
|
||||
if recipe_instructions:
|
||||
if recipe_instructions is not None:
|
||||
self.recipe_instructions = [RecipeInstruction(**step, session=session) for step in recipe_instructions]
|
||||
|
||||
if recipe_ingredient:
|
||||
if recipe_ingredient is not None:
|
||||
self.recipe_ingredient = [RecipeIngredient(**ingr, session=session) for ingr in recipe_ingredient]
|
||||
|
||||
if assets:
|
||||
|
||||
Reference in New Issue
Block a user