feat: Add brute strategy to ingredient processor (#744)

* fix UI column width

* words

* update parser to support diff strats

* add new model url

* make button more visible

* fix nutrition error

* feat(backend):  add 'brute' strategy for parsing ingredients

* satisfy linter

* update UI for creation page

* feat(backend):  log 422 errors in detail when not in PRODUCTION

* add strategy selector

Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-10-16 16:06:13 -08:00
committed by GitHub
parent 60908e5a88
commit 3b920babe3
25 changed files with 961 additions and 131 deletions

View File

@@ -117,7 +117,7 @@ class RecipeModel(SqlAlchemyBase, BaseMixins):
tools: list[str] = None,
**_
) -> None:
self.nutrition = Nutrition(**nutrition) if self.nutrition else Nutrition()
self.nutrition = Nutrition(**nutrition) if nutrition else Nutrition()
self.tools = [Tool(tool=x) for x in tools] if tools else []
self.recipe_ingredient = [RecipeIngredient(**ingr, session=session) for ingr in recipe_ingredient]
self.assets = [RecipeAsset(**a) for a in assets]