Bugfix no menus shown
This commit is contained in:
parent
d5b86ae001
commit
c27dfd39fb
1 changed files with 7 additions and 7 deletions
14
mensaplan.py
14
mensaplan.py
|
@ -71,17 +71,17 @@ 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
|
||||
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])
|
||||
week = 1
|
||||
day = get_day()
|
||||
for meal in plan["weeks"][week]["days"][day][place]["meals"]:
|
||||
if place == "Diner":
|
||||
print(meal["category"] + " " + meal["meal"])
|
||||
else:
|
||||
for meal in plan["weeks"][0]["days"][day][place]["meals"]:
|
||||
print(meal["category"] + ": " + meal["meal"])
|
||||
|
||||
def main():
|
||||
|
|
Reference in a new issue