feat: Improve Recipe Imports with Cleaner (#4517)

This commit is contained in:
Michael Genson
2024-11-13 09:30:50 -06:00
committed by GitHub
parent 085c489b05
commit bcd0fcc920
6 changed files with 51 additions and 11 deletions

View File

@@ -268,6 +268,5 @@ class BaseMigrator(BaseService):
with contextlib.suppress(KeyError):
del recipe_dict["id"]
recipe_dict = cleaner.clean(recipe_dict, self.translator, url=recipe_dict.get("org_url", None))
return Recipe(**recipe_dict)
recipe = cleaner.clean(recipe_dict, self.translator, url=recipe_dict.get("org_url", None))
return recipe