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