fix: scrape images as list (#4293)

This commit is contained in:
Kuchenpirat
2024-09-30 19:07:14 +02:00
committed by GitHub
parent 49a392f4e2
commit 1bd3d38dfc

View File

@@ -54,6 +54,8 @@ async def create_from_html(
recipe_data_service = RecipeDataService(new_recipe.id) recipe_data_service = RecipeDataService(new_recipe.id)
try: try:
if new_recipe.image and isinstance(new_recipe.image, list):
new_recipe.image = new_recipe.image[0]
await recipe_data_service.scrape_image(new_recipe.image) # type: ignore await recipe_data_service.scrape_image(new_recipe.image) # type: ignore
if new_recipe.name is None: if new_recipe.name is None: