diff --git a/cookbook/views/api.py b/cookbook/views/api.py index b5895c6de..2e11913a6 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -1869,8 +1869,12 @@ class ImageToRecipeView(APIView): scrape = scrape_html(html=data, org_url='https://urlnotfound.none', supported_only=False) if scrape: + recipe = helper.get_from_scraper(scrape, request) + obj, created = Keyword.objects.get_or_create(name='✨ AI', space=request.space) + recipe['keywords'].append({'label': obj.name, 'name': obj.name, 'id': obj.id, 'import_keyword': True}) + response = {} - response['recipe'] = helper.get_from_scraper(scrape, request) + response['recipe'] = recipe response['images'] = [] response['duplicates'] = [] return Response(RecipeFromSourceResponseSerializer(context={'request': request}).to_representation(response), status=status.HTTP_200_OK) diff --git a/vue3/src/pages/RecipeImportPage.vue b/vue3/src/pages/RecipeImportPage.vue index 5c0699320..e7fae4899 100644 --- a/vue3/src/pages/RecipeImportPage.vue +++ b/vue3/src/pages/RecipeImportPage.vue @@ -118,7 +118,13 @@ - + + + @@ -365,11 +371,11 @@ - + - +