From 2f004fec7dac9bab0bb1cf4396aaa0307cf4760a Mon Sep 17 00:00:00 2001 From: dymik739 Date: Mon, 10 Apr 2023 15:26:50 +0300 Subject: [PATCH] auto-schedule-pro: fix redirection fail when more than one link provided by the schedule --- modules/auto-schedule-pro/www/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/auto-schedule-pro/www/index.py b/modules/auto-schedule-pro/www/index.py index 1b73208..6334373 100644 --- a/modules/auto-schedule-pro/www/index.py +++ b/modules/auto-schedule-pro/www/index.py @@ -80,7 +80,7 @@ if next_pair_time == None: #self.RESPONCE = "Актуальна пара: {}\nДата: {}\nВикладач: {}\nПосилання на пару: {}".format(p['name'], human_readable_date, p['teacher'], p['link']) #print("test3.1.5") - print(f"Location: {p['link']}\n\n") + print(f"Location: {p['link'].split()[0]}\n\n") else: self.RESPONCE = "Пар немає взагалі. Ми вільні!" @@ -108,4 +108,4 @@ else: #self.RESPONCE = "Актуальна пара: {}\nДата: {}\nВикладач: {}\nПосилання на пару: {}".format(p['name'], human_readable_date, p['teacher'], p['link']) - print(f"Location: {p['link']}\n\n") + print(f"Location: {p['link'].split()[0]}\n\n")