fix: Remove redundant get_one call in patch_one method (#5619)

This commit is contained in:
Joey authored and GitHub committed 2025-07-08 21:56:59 +00:00
1 parent 04eca1b992
commit 50754ad012
1 file changed
+1 -2
+1 -2
View File
@@ -404,8 +404,7 @@ class RecipeService(RecipeServiceBase):
return new_data
def patch_one(self, slug_or_id: str | UUID, patch_data: Recipe) -> Recipe:
recipe: Recipe | None = self._pre_update_check(slug_or_id, patch_data)
recipe = self.get_one(slug_or_id)
recipe: Recipe = self._pre_update_check(slug_or_id, patch_data)
new_data = self.group_recipes.patch(recipe.slug, patch_data.model_dump(exclude_unset=True))