Added notification when there are no entries

master
alex 2022-09-03 17:47:33 +02:00
parent 1770c2e7ee
commit a4c9611fc9
1 changed files with 2 additions and 8 deletions

10
main.py
View File

@ -133,14 +133,8 @@ class Bot:
else: # there are no entries
print('next day - no entries')
todayEncodedBytes = "-"
nextDayEncodedBytes = "-"
if len(today_school_day) > 0:
todayEncodedBytes = base64.b64encode(json.dumps(today_school_day).encode("utf-8"))
if len(next_school_day) > 0:
nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8"))
todayEncodedBytes = base64.b64encode(json.dumps(today_school_day).encode("utf-8"))
nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8"))
txt = "../school-portal-substitution-plan-matrix-chat-bot/main {} {}".format(str(todayEncodedBytes, "utf-8"), str(nextDayEncodedBytes, "utf-8"))