mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-30 17:53:31 -04:00 
			
		
		
		
	fixes #306
This commit is contained in:
		| @@ -26,9 +26,9 @@ class Cleaner: | |||||||
|         recipe_data["description"] = Cleaner.html(recipe_data.get("description", "")) |         recipe_data["description"] = Cleaner.html(recipe_data.get("description", "")) | ||||||
|  |  | ||||||
|         # Times |         # Times | ||||||
|         recipe_data["prepTime"] = Cleaner.time(recipe_data.get("prepTime", None)) |         recipe_data["prepTime"] = Cleaner.time(recipe_data.get("prepTime")) | ||||||
|         recipe_data["performTime"] = Cleaner.time(recipe_data.get("performTime", None)) |         recipe_data["performTime"] = Cleaner.time(recipe_data.get("performTime")) | ||||||
|         recipe_data["totalTime"] = Cleaner.time(recipe_data.get("totalTime", None)) |         recipe_data["totalTime"] = Cleaner.time(recipe_data.get("totalTime")) | ||||||
|         recipe_data["recipeCategory"] = Cleaner.category(recipe_data.get("recipeCategory", [])) |         recipe_data["recipeCategory"] = Cleaner.category(recipe_data.get("recipeCategory", [])) | ||||||
|  |  | ||||||
|         recipe_data["recipeYield"] = Cleaner.yield_amount(recipe_data.get("recipeYield")) |         recipe_data["recipeYield"] = Cleaner.yield_amount(recipe_data.get("recipeYield")) | ||||||
| @@ -70,6 +70,9 @@ class Cleaner: | |||||||
|         if not instructions: |         if not instructions: | ||||||
|             return [] |             return [] | ||||||
|  |  | ||||||
|  |         if isinstance(instructions[0], list): | ||||||
|  |             instructions = instructions[0] | ||||||
|  |  | ||||||
|         # One long string split by (possibly multiple) new lines |         # One long string split by (possibly multiple) new lines | ||||||
|         if isinstance(instructions, str): |         if isinstance(instructions, str): | ||||||
|             return [{"text": Cleaner._instruction(line)} for line in instructions.splitlines() if line] |             return [{"text": Cleaner._instruction(line)} for line in instructions.splitlines() if line] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user