Skip to content

Commit

Permalink
fix: fix empty prints with english opts (#34)
Browse files Browse the repository at this point in the history
fix empty print bug with english opts
  • Loading branch information
jkerola authored Sep 18, 2023
1 parent 93b3966 commit c765d67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/jmenu/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ def _parse_items(data: list[dict], relevant_menus: list[str] = []) -> list[MenuI
sorted(mealopts, key=lambda x: x["orderNumber"])
for opt in mealopts:
for item in opt["menuItems"]:
if item["name"] not in SKIPPED_ITEMS:
if item["name"] not in SKIPPED_ITEMS and len(item["name"]) > 0:
items.append(MenuItem(item["name"], item["diets"]))
return items
1 change: 0 additions & 1 deletion src/jmenu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def _print_menu(args: _ArgsNamespace):
for res in RESTAURANTS:
try:
items = fetch_restaurant_items(res, fetch_date, args.lang_code)

if len(items) == 0:
print(res.name.ljust(8), "--")
else:
Expand Down

0 comments on commit c765d67

Please sign in to comment.