diff --git a/mealie/routes/recipe/recipe_crud_routes.py b/mealie/routes/recipe/recipe_crud_routes.py index 9d236bf0c..20065cf41 100644 --- a/mealie/routes/recipe/recipe_crud_routes.py +++ b/mealie/routes/recipe/recipe_crud_routes.py @@ -374,7 +374,7 @@ class RecipeController(BaseRecipeController): If you wish to update parts of the recipe only, use a PATCH request to this route """ try: - recipe = self.service.update_one(slug, data, strict=True) + recipe = self.service.update_one(slug, data) except Exception as e: self.handle_exceptions(e) @@ -399,7 +399,7 @@ class RecipeController(BaseRecipeController): lambda: defaultdict(list) ) for recipe in data: - r = self.service.update_one(recipe.id, recipe, strict=True) # type: ignore + r = self.service.update_one(recipe.id, recipe) # type: ignore updated_by_group_and_household[r.group_id][r.household_id].append(r) all_updated: list[Recipe] = [] diff --git a/mealie/services/recipe/recipe_service.py b/mealie/services/recipe/recipe_service.py index bbef50244..b87730f66 100644 --- a/mealie/services/recipe/recipe_service.py +++ b/mealie/services/recipe/recipe_service.py @@ -402,15 +402,15 @@ class RecipeService(RecipeServiceBase): return recipe - def update_one(self, slug_or_id: str | UUID, update_data: Recipe, strict: bool) -> Recipe: - recipe = self._pre_update_check(slug_or_id, update_data, strict) + def update_one(self, slug_or_id: str | UUID, update_data: Recipe) -> Recipe: + recipe = self._pre_update_check(slug_or_id, update_data, True) new_data = self.group_recipes.update(recipe.slug, update_data) self.check_assets(new_data, recipe.slug) return new_data def patch_one(self, slug_or_id: str | UUID, patch_data: Recipe) -> Recipe: - recipe: Recipe = self._pre_update_check(slug_or_id, patch_data) + recipe: Recipe = self._pre_update_check(slug_or_id, patch_data, False) new_data = self.group_recipes.patch(recipe.slug, patch_data.model_dump(exclude_unset=True))