removed if statement checking if ingredient name exists from ingredient_from_text parser

This commit is contained in:
smilerz
2021-06-08 15:48:02 -05:00
parent c71a7dad24
commit 8daa0ada9b
4 changed files with 6389 additions and 20 deletions

View File

@@ -101,22 +101,21 @@ def get_from_scraper(scrape, space):
for x in scrape.ingredients():
try:
amount, unit, ingredient, note = parse_single_ingredient(x)
if ingredient:
ingredients.append(
{
'amount': amount,
'unit': {
'text': unit,
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': ingredient,
'id': random.randrange(10000, 99999)
},
'note': note,
'original': x
}
)
ingredients.append(
{
'amount': amount,
'unit': {
'text': unit,
'id': random.randrange(10000, 99999)
},
'ingredient': {
'text': ingredient,
'id': random.randrange(10000, 99999)
},
'note': note,
'original': x
}
)
except Exception:
ingredients.append(
{