Compare commits
2 Commits
c83251c4d4
...
4f4458c425
Author | SHA1 | Date |
---|---|---|
Stefano Assenzo | 4f4458c425 | |
Stefano Assenzo | 44ce965fb3 |
|
@ -474,7 +474,7 @@ def update_time_school():
|
||||||
dont_repeat = 0
|
dont_repeat = 0
|
||||||
else:
|
else:
|
||||||
if day == "None":
|
if day == "None":
|
||||||
if school_subject == 0: #If school subject is 0, add "" in MongoDB
|
if school_subject == 0 or school_subject == "0": #If school subject is 0, add "" in MongoDB
|
||||||
number += 1
|
number += 1
|
||||||
gagaga += 1
|
gagaga += 1
|
||||||
dont_repeat += 1
|
dont_repeat += 1
|
||||||
|
@ -533,7 +533,7 @@ def update_time_school():
|
||||||
array_test = []
|
array_test = []
|
||||||
array_test.append(convert_date_to_day)
|
array_test.append(convert_date_to_day)
|
||||||
number_day += 1
|
number_day += 1
|
||||||
if school_subject == 0: #If school subject is 0, add "" in MongoDB
|
if school_subject == 0 or school_subject == "0": #If school subject is 0, add "" in MongoDB
|
||||||
find_document_school_time_table = list(collection.find({}, {"Date": long_date}))
|
find_document_school_time_table = list(collection.find({}, {"Date": long_date}))
|
||||||
find_document_archive_school_time_table = list(collection_archive.find({}, {"Date": long_date}))
|
find_document_archive_school_time_table = list(collection_archive.find({}, {"Date": long_date}))
|
||||||
array_document_school_time_table = find_document_school_time_table[0]["_id"]
|
array_document_school_time_table = find_document_school_time_table[0]["_id"]
|
||||||
|
@ -541,7 +541,7 @@ def update_time_school():
|
||||||
collection.update_one(
|
collection.update_one(
|
||||||
{ "_id": ObjectId(array_document_school_time_table)},
|
{ "_id": ObjectId(array_document_school_time_table)},
|
||||||
{ "$set": {
|
{ "$set": {
|
||||||
"School Subject." + array_test[0] + "." + str(gagaga) + ".Subject": remove_things_in_front,
|
"School Subject." + array_test[0] + "." + str(gagaga) + ".Subject": school_subject,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -760,7 +760,7 @@ def update_time_school():
|
||||||
gagaga_room = 0
|
gagaga_room = 0
|
||||||
|
|
||||||
# Look for other classes doing PE at the same time as us
|
# 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" or search_motoria == "CEAM EDUCAZIONE ATTIVITA' MOTORIA":
|
if school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIE" or school_subject == "CEAM EDUCAZIONE ATTIVITA' MOTORIA":
|
||||||
for c in range(1,100):
|
for c in range(1,100):
|
||||||
search_motoria = ws.cell(row=i, column=c).value
|
search_motoria = ws.cell(row=i, column=c).value
|
||||||
#print(search_motoria)
|
#print(search_motoria)
|
||||||
|
@ -783,7 +783,6 @@ def update_time_school():
|
||||||
# Search if class le3 is busy
|
# Search if class le3 is busy
|
||||||
for c in range(1,100):
|
for c in range(1,100):
|
||||||
search_other_subject = ws.cell(row=i, column=c).value
|
search_other_subject = ws.cell(row=i, column=c).value
|
||||||
search_room = ws.cell(row=i, column=c).value
|
|
||||||
if c == column:
|
if c == column:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue