From f908f4c116cb47be1a7488732355cad880585442 Mon Sep 17 00:00:00 2001 From: Stefano Assenzo Date: Sun, 12 Feb 2023 11:24:54 +0000 Subject: [PATCH] Mini bug not caused by me but by whoever writes the school timetable, because instead of writing motor activities he wrote motor activity so the script did not find the class with which we will do motor activity. Now I fixed --- src/events/school_time/update_time_school.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/school_time/update_time_school.py b/src/events/school_time/update_time_school.py index af17f60..1d3b73c 100644 --- a/src/events/school_time/update_time_school.py +++ b/src/events/school_time/update_time_school.py @@ -760,15 +760,16 @@ def update_time_school(): gagaga_room = 0 # Look for other classes doing PE at the same time as us - if school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE": + if school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIA": for c in range(1,100): search_motoria = ws.cell(row=i, column=c).value #print(search_motoria) - if search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE": + if search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIA": if c == column: pass else: search_class = ws.cell(row=3, column=c).value + print(search_class) collection.update_one( { "_id": ObjectId(array_document_school_time_table)}, { "$set": {