Skip to content

Commit

Permalink
Merge pull request #3359 from Chronophylos/mealie-import
Browse files Browse the repository at this point in the history
Fix null-constrait errors in mealie import
  • Loading branch information
vabene1111 authored Oct 14, 2024
2 parents 416ddf3 + 736d829 commit 3a002cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/integration/mealie.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3a002cc

Please sign in to comment.