Skip to content

Commit

Permalink
Use correct kinds for vegetables2
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Jan 26, 2024
1 parent 3821a2e commit 3905428
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/scraper/resto/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,18 @@ def get_day_menu(which, url, allergens: Dict[str, str]):
vegetables.append(meal)
if ":" in meal:
kind, name = meal.split(":")
if kind != 'vegan' and kind != 'vegetarian':
if kind in POSSIBLE_VEGETARIAN:
kind = 'vegetarian'
elif kind in POSSIBLE_VEGAN:
kind = 'vegan'
else:
kind = 'meat'
else:
kind = 'meat'
name = meal
vegetable_allergens = find_allergens_for_food(allergens, name)
vegetable = {
'name': name,
'name': name.strip(),
'kind': kind,
'allergens': vegetable_allergens
}
Expand Down

0 comments on commit 3905428

Please sign in to comment.