Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pizzapi/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def build_categories(self, category_data, parent=None):
category.subcategories.append(new_subcategory)
for product_code in category_data['Products']:
if product_code not in self.menu_by_code:
raise Exception('PRODUCT NOT FOUND: %s %s' % (product_code, category.code))
# Skip products that don't exist in the menu data
# This handles phantom references and excluded/unavailable items
continue
product = self.menu_by_code[product_code]
category.products.append(product)
product.categories.append(category)
Expand Down