diff --git a/cookbook/integration/mealie.py b/cookbook/integration/mealie.py index 5e4e1578d..2d46e2cde 100644 --- a/cookbook/integration/mealie.py +++ b/cookbook/integration/mealie.py @@ -7,7 +7,7 @@ from cookbook.helper.image_processing import get_filetype from cookbook.helper.ingredient_parser import IngredientParser from cookbook.helper.recipe_url_import import parse_servings, parse_servings_text, parse_time from cookbook.integration.integration import Integration -from cookbook.models import Ingredient, Recipe, Step +from cookbook.models import Ingredient, Keyword, Recipe, Step class Mealie(Integration): @@ -56,6 +56,11 @@ class Mealie(Integration): except Exception: pass + if 'tags' in recipe_json and len(recipe_json['tags']) > 0: + for k in recipe_json['tags']: + keyword, created = Keyword.objects.get_or_create(name=k["name"].strip(), space=self.request.space) + recipe.keywords.add(keyword) + if 'notes' in recipe_json and len(recipe_json['notes']) > 0: notes_text = "#### Notes \n\n" for n in recipe_json['notes']: