diff --git a/cookbook/integration/mealie.py b/cookbook/integration/mealie.py index 21ff633c50..f8c2f2423a 100644 --- a/cookbook/integration/mealie.py +++ b/cookbook/integration/mealie.py @@ -72,14 +72,14 @@ def get_recipe_from_file(self, file): ) recipe.steps.add(step) - if 'recipe_yield' in recipe_json: + if 'recipe_yield' in recipe_json and recipe_json['recipe_yield'] is not None: recipe.servings = parse_servings(recipe_json['recipe_yield']) recipe.servings_text = parse_servings_text(recipe_json['recipe_yield']) if 'total_time' in recipe_json and recipe_json['total_time'] is not None: recipe.working_time = parse_time(recipe_json['total_time']) - if 'org_url' in recipe_json: + if 'org_url' in recipe_json and recipe_json['org_url'] is not None: recipe.source_url = recipe_json['org_url'] recipe.save()