Skip to content

Commit

Permalink
Fix allergens
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Sep 4, 2023
1 parent e8424f3 commit 9ba70df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/scraper/resto/allergens.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ def parse_section_item(section_item: str) -> Union[dict[str, list[str]], None]:
"""
Parses strings of the form `food: allergen, allergen, allergen`
"""

item_name, item_allergen_list = section_item.split(":")

if "soep van de dag" in section_item:
item_name = "Soep van de dag"
item_allergen_list = section_item
else:
item_name, item_allergen_list = section_item.split(":")

# Sometimes a section will have extra info before the item list,
# this should not be parsed
Expand Down

0 comments on commit 9ba70df

Please sign in to comment.