mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Merge branch 'dev' of https://github.com/hay-kot/mealie into refactor/response-models
This commit is contained in:
commit
228558405e
2 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,8 @@ def import_recipes(recipe_dir: Path) -> Recipe:
|
|||
for file in recipe_dir.glob("full.*"):
|
||||
image = file
|
||||
|
||||
recipe_file = recipe_dir.joinpath("recipe.json")
|
||||
for file in recipe_dir.glob("*.json"):
|
||||
recipe_file = file
|
||||
|
||||
with open(recipe_file, "r") as f:
|
||||
recipe_dict = json.loads(f.read())
|
||||
|
@ -81,6 +82,7 @@ def migrate(session, selection: str):
|
|||
successful_imports.append(recipe.name)
|
||||
except:
|
||||
logging.error(f"Failed Nextcloud Import: {dir.name}")
|
||||
logging.exception('')
|
||||
failed_imports.append(dir.name)
|
||||
|
||||
cleanup()
|
||||
|
|
|
@ -35,6 +35,9 @@ def normalize_image_url(image) -> str:
|
|||
|
||||
|
||||
def normalize_instructions(instructions) -> List[dict]:
|
||||
if not instructions:
|
||||
return []
|
||||
|
||||
# One long string split by (possibly multiple) new lines
|
||||
if type(instructions) == str:
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue