mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-26 09:43:19 -05:00
feat: Add DELETE /{slug}/image (#6259)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7bb0f0801a
commit
bb67d993a0
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user