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
This commit is contained in:
Stefano Assenzo 2023-02-12 11:24:54 +00:00 committed by GitHub
parent 3fe56893b6
commit f908f4c116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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": {