Fixed recipe parsing for py3.11

This commit is contained in:
jableader 2024-09-22 12:09:52 +10:00
parent 6ae7036ca7
commit 676378b4fb

View file

@ -39,7 +39,7 @@ def parse_ingredient_from_nlp(ingredient_string: str) -> Ingredient:
quantity = amount.quantity
if unit is None and amount.unit:
real_unit = units.get_unit(amount.unit)
real_unit = units.get_unit(str(amount.unit))
if real_unit:
unit = real_unit.name