Bugfix no menus shown

This commit is contained in:
mmk2410 2016-01-13 17:43:09 +01:00
parent d5b86ae001
commit c27dfd39fb
1 changed files with 7 additions and 7 deletions

View File

@ -71,17 +71,17 @@ def print_menu(place, static=False):
place -- name of the cafeteria / mensa place -- name of the cafeteria / mensa
static -- set true if a static menu exists (default: False) static -- set true if a static menu exists (default: False)
""" """
day = get_day()
if static: if static:
plan = get(FILES[1]) plan = get(FILES[1])
week = 0 for meal in plan["weeks"][0]["days"][day][place]["meals"]:
if place == "Diner":
print(meal["category"] + " " + meal["meal"])
else:
print(meal["category"] + ": " + meal["meal"])
else: else:
plan = get(FILES[0]) plan = get(FILES[0])
week = 1 for meal in plan["weeks"][0]["days"][day][place]["meals"]:
day = get_day()
for meal in plan["weeks"][week]["days"][day][place]["meals"]:
if place == "Diner":
print(meal["category"] + " " + meal["meal"])
else:
print(meal["category"] + ": " + meal["meal"]) print(meal["category"] + ": " + meal["meal"])
def main(): def main():