Merge branch 'master' into develop

# Conflicts:
#	requirements.txt
This commit is contained in:
vabene1111
2022-01-06 16:08:06 +01:00
2 changed files with 17 additions and 5 deletions

View File

@@ -1000,7 +1000,16 @@ def recipe_from_source(request):
},
status=400
)
if len(scrape.ingredients()) and len(scrape.instructions()) == 0:
try:
instructions = scrape.instructions()
except Exception:
instructions = ""
try:
ingredients = scrape.ingredients()
except Exception:
ingredients = []
if len(ingredients) + len(instructions) == 0:
return JsonResponse(
{
'error': True,