Fix JSON database MongoDB

This commit is contained in:
Stefano Assenzo 2023-01-26 17:12:51 +00:00 committed by GitHub
parent debaf06011
commit 5ef9c4f0f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 146 additions and 146 deletions

View File

@ -40,254 +40,254 @@ def update_time_school():
"School Subject": {
"Monday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
"Tuesday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
"Wednesday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
"Thursday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
"Friday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
"Saturday": [
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
{
"Subject": "null",
"Teacher": "null",
"Room": "null",
"Subject": "",
"Teacher": "",
"Room": "",
},
],
}
@ -330,7 +330,7 @@ def update_time_school():
dont_repeat = 0
else:
if day == "None":
if school_subject == 0: #If school subject is 0, add "null" in MongoDB
if school_subject == 0: #If school subject is 0, add "" in MongoDB
number += 1
gagaga += 1
dont_repeat += 1
@ -372,7 +372,7 @@ def update_time_school():
array_test = []
array_test.append(convert_date_to_day)
number_day += 1
if school_subject == 0: #If school subject is 0, add "null" in MongoDB
if school_subject == 0: #If school subject is 0, add "" in MongoDB
find_document_school_time_table = list(collection.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"]