handle recipeInstructions that are given as json objects / name-value pairs (#509)

This commit is contained in:
tklingenberg8472
2021-06-13 20:36:38 +02:00
committed by GitHub
parent 8abcf0ca4d
commit 72e614b6e5

View File

@@ -70,6 +70,10 @@ class Cleaner:
if not instructions: if not instructions:
return [] return []
# Dictionary (Keys: step number strings, Values: the instructions)
if isinstance(instructions, dict):
instructions = list(instructions.values())
if isinstance(instructions[0], list): if isinstance(instructions[0], list):
instructions = instructions[0] instructions = instructions[0]