mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 05:25:26 +02:00
fix: scrape images as list (#4293)
This commit is contained in:
parent
49a392f4e2
commit
1bd3d38dfc
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue