From a4c9611fc92f64c8087e1ad942b09c3e5c696d97 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 3 Sep 2022 17:47:33 +0200 Subject: [PATCH] Added notification when there are no entries --- main.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index bb3a469..46f4b67 100755 --- a/main.py +++ b/main.py @@ -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"))