Skip to content

Commit

Permalink
revert is_cafe breaking change (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateow99 authored Nov 15, 2023
1 parent 447681c commit 76ef9f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/category/controllers/populate_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def process(self, events_dict, json_eateries):
else:
continue

desired_descriptions = {"Cafe", "Cart", "Coffee Shop", "Food Court"}
eatery_descriptions = {eatery_type["descr"] for eatery_type in json_eatery["eateryTypes"]}
is_cafe = bool(desired_descriptions.intersection(eatery_descriptions))
is_cafe = "Cafe" in {
eatery_type["descr"] for eatery_type in json_eatery["eateryTypes"]
}

"""
For every event in an eatery --> for every menu in an eatery --> get categories
Expand Down
6 changes: 3 additions & 3 deletions src/item/controllers/populate_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def process(self, categories_dict, json_eateries):
iter = list(eatery_menus.keys())
i = 0

desired_descriptions = {"Cafe", "Cart", "Coffee Shop", "Food Court"}
eatery_descriptions = {eatery_type["descr"] for eatery_type in json_eatery["eateryTypes"]}
is_cafe = bool(desired_descriptions.intersection(eatery_descriptions))
is_cafe = "Cafe" in {
eatery_type["descr"] for eatery_type in json_eatery["eateryTypes"]
}

json_dates = json_eatery["operatingHours"]
for json_date in json_dates:
Expand Down

0 comments on commit 76ef9f3

Please sign in to comment.