feat: Add DELETE /{slug}/image (#6259)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Christian Hollinger
2025-11-03 20:41:54 -05:00
committed by GitHub
parent 7bb0f0801a
commit bb67d993a0
12 changed files with 150 additions and 16 deletions

View File

@@ -154,6 +154,11 @@ class RepositoryRecipes(HouseholdRepositoryGeneric[Recipe, RecipeModel]):
return entry.image
def delete_image(self, slug: str, _: str | None = None):
entry: RecipeModel = self._query_one(match_value=slug)
entry.image = None
self.session.commit()
def count_uncategorized(self, count=True, override_schema=None):
return self._count_attribute(
attribute_name=RecipeModel.recipe_category,