20/05/2025 - 21hu

Signed-off-by: cherif <cherif.balde@yahoo.fr>
master
cherif 2025-05-21 20:22:02 +02:00
parent 8e3300d74e
commit 4f09c7c9df
4 changed files with 2779 additions and 57 deletions

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/05/2025 - 17h">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="20/05/2025 - 21h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jury_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/jury_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -81,13 +82,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00416" summary="08/12/2024 - 12h">
<created>1733655942461</created>
<option name="number" value="00416" />
<option name="presentableId" value="LOCAL-00416" />
<option name="project" value="LOCAL" />
<updated>1733655942463</updated>
</task>
<task id="LOCAL-00417" summary="10/12/2024 - 22h">
<created>1733865023238</created>
<option name="number" value="00417" />
@ -424,7 +418,14 @@
<option name="project" value="LOCAL" />
<updated>1747755919782</updated>
</task>
<option name="localTasksCounter" value="465" />
<task id="LOCAL-00465" summary="20/05/2025 - 21h">
<created>1747767227017</created>
<option name="number" value="00465" />
<option name="presentableId" value="LOCAL-00465" />
<option name="project" value="LOCAL" />
<updated>1747767227018</updated>
</task>
<option name="localTasksCounter" value="466" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -466,7 +467,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="11/02/2025 - 15h30" />
<MESSAGE value="11/02/2025 - 21h" />
<MESSAGE value="18/02/2025 - 21h" />
<MESSAGE value="27/02/2025 - 21h" />
@ -491,6 +491,7 @@
<MESSAGE value="17/05/25 - 12h" />
<MESSAGE value="19/05/2025 - 20h" />
<MESSAGE value="20/05/2025 - 17h" />
<option name="LAST_COMMIT_MESSAGE" value="20/05/2025 - 17h" />
<MESSAGE value="20/05/2025 - 21h" />
<option name="LAST_COMMIT_MESSAGE" value="20/05/2025 - 21h" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,8 @@ def Add_Jury(diction):
"""
field_list = ['token', 'code', 'description', 'comment', 'responsable_id',
'session_id', 'email_jury', 'chef_jury_id', 'session_id',
'ue_id', 'cible']
'ue_id', 'cible', 'adresse', 'code_postal', 'ville', 'pays',
'site_formation_id', 'jury_salle']
incom_keys = diction.keys()
for val in incom_keys:
@ -591,7 +592,8 @@ def Update_Jury(diction):
Verification des input acceptés
"""
field_list = ['token', 'code', 'description', 'email_jury', 'chef_jury_id', '_id',
'session_id', 'cible', 'ue_id' ]
'session_id', 'cible', 'ue_id', 'adresse', 'code_postal', 'ville', 'pays',
'site_formation_id', 'jury_salle']
incom_keys = diction.keys()
for val in incom_keys:
@ -1238,6 +1240,26 @@ def Get_Given_Jury_With_Members(diction):
user = retval
user['id'] = str(val_tmp)
if( "adresse" not in user.keys() ):
user['adresse'] = ""
if ("code_postal" not in user.keys()):
user['code_postal'] = ""
if ("ville" not in user.keys()):
user['ville'] = ""
if ("pays" not in user.keys()):
user['pays'] = ""
if ("site_formation_id" not in user.keys()):
user['site_formation_id'] = ""
if ("jury_salle" not in user.keys()):
user['jury_salle'] = ""
# Aller chercher les membres
list_membre = []
@ -1560,7 +1582,9 @@ def Add_Update_Apprenant_To_Jury(diction):
Verification des input acceptés
"""
field_list = ['token', '_id', 'tab_inscriptions_ids', 'agenda_id', 'jury_seance_ue_id',
'event_start', 'event_end', 'jury_soutenance_id']
'event_start', 'event_end', 'jury_soutenance_id', 'jury_soutenance_salle',
'jury_soutenance_adresse', 'jury_soutenance_code_postal', 'jury_soutenance_ville',
'jury_soutenance_pays']
incom_keys = diction.keys()
for val in incom_keys:
@ -1622,18 +1646,21 @@ def Add_Update_Apprenant_To_Jury(diction):
if diction['tab_inscriptions_ids']:
tab_inscriptions_ids = diction['tab_inscriptions_ids']
tab_inscriptions_ids_splited = str(tab_inscriptions_ids).split(",")
# Controle de validité des inscriptions
for my_inscription in tab_inscriptions_ids_splited:
# Verifier que l'inscription est valide
my_inscription_is_valide = MYSY_GV.dbname['inscription'].count_documents(
{'_id': ObjectId(str(my_inscription)),
'partner_owner_recid': str(my_partner['recid'])})
if(my_inscription ):
# Verifier que l'inscription est valide
my_inscription_is_valide = MYSY_GV.dbname['inscription'].count_documents(
{'_id': ObjectId(str(my_inscription)),
'partner_owner_recid': str(my_partner['recid'])})
if (my_inscription_is_valide != 1):
mycommon.myprint(
str(inspect.stack()[0][3]) + " L'inscription_id '" + my_inscription + "' est invalide ")
return False, " L'inscription_id '" + my_inscription + "' est invalide ", False, False
if (my_inscription_is_valide != 1):
mycommon.myprint(
str(inspect.stack()[0][3]) + " L'inscription_id '" + my_inscription + "' est invalide ")
return False, " L'inscription_id '" + my_inscription + "' est invalide ", False, False
soutenance_inserted_id = str(diction['jury_soutenance_id'])
agenda_inserted_id = str(diction['agenda_id'])
@ -1654,6 +1681,33 @@ def Add_Update_Apprenant_To_Jury(diction):
new_soutenance_data['sujet'] = ""
new_soutenance_data['observation'] = ""
new_soutenance_data['note'] = ""
if( "jury_soutenance_salle" in diction.keys() ):
new_soutenance_data['jury_soutenance_salle'] = str(diction['jury_soutenance_salle'])
else:
new_soutenance_data['jury_soutenance_salle'] = ""
if ("jury_soutenance_adresse" in diction.keys()):
new_soutenance_data['jury_soutenance_adresse'] = str(diction['jury_soutenance_adresse'])
else:
new_soutenance_data['jury_soutenance_adresse'] = ""
if ("jury_soutenance_code_postal" in diction.keys()):
new_soutenance_data['jury_soutenance_code_postal'] = str(diction['jury_soutenance_code_postal'])
else:
new_soutenance_data['jury_soutenance_code_postal'] = ""
if ("jury_soutenance_ville" in diction.keys()):
new_soutenance_data['jury_soutenance_ville'] = str(diction['jury_soutenance_ville'])
else:
new_soutenance_data['jury_soutenance_ville'] = ""
if ("jury_soutenance_pays" in diction.keys()):
new_soutenance_data['jury_soutenance_pays'] = str(diction['jury_soutenance_pays'])
else:
new_soutenance_data['jury_soutenance_pays'] = ""
new_soutenance_data['convocation_apprenant_send'] = "0"
new_soutenance_data['convocation_apprenant_date_sending'] = ""
new_soutenance_data['create_date'] = str(datetime.now())
@ -1705,9 +1759,8 @@ def Add_Update_Apprenant_To_Jury(diction):
upsert=False,
)
else:
# Il s'agit d'une mise à jour à faire.
is_agenda_valide = MYSY_GV.dbname['agenda'].count_documents(
{'_id': ObjectId(str(diction['agenda_id'])),
'partner_owner_recid': str(my_partner['recid'])})
@ -1726,6 +1779,59 @@ def Add_Update_Apprenant_To_Jury(diction):
str(inspect.stack()[0][3]) + " L'identifiant de la soutenance est invalide ")
return False, " L'identifiant de la soutenance est invalide ", False, False
# Verifier si l'id de la soutenance est valide
is_jury_soutenance_valide = MYSY_GV.dbname['jury_soutenance'].count_documents({'_id':ObjectId(str(diction['jury_soutenance_id'])),
'valide':'1',
'locked':'0',
'partner_owner_recid':str(my_partner['recid'])})
if (is_jury_soutenance_valide != 1):
mycommon.myprint(
str(inspect.stack()[0][3]) + " L'identifiant de la soutenance est invalide ")
return False, " L'identifiant de la soutenance est invalide ", False, False
# Mise à jour de la soutenance
new_soutenance_data = {}
if ("jury_soutenance_salle" in diction.keys()):
new_soutenance_data['jury_soutenance_salle'] = str(diction['jury_soutenance_salle'])
else:
new_soutenance_data['jury_soutenance_salle'] = ""
if ("jury_soutenance_adresse" in diction.keys()):
new_soutenance_data['jury_soutenance_adresse'] = str(diction['jury_soutenance_adresse'])
else:
new_soutenance_data['jury_soutenance_adresse'] = ""
if ("jury_soutenance_code_postal" in diction.keys()):
new_soutenance_data['jury_soutenance_code_postal'] = str(diction['jury_soutenance_code_postal'])
else:
new_soutenance_data['jury_soutenance_code_postal'] = ""
if ("jury_soutenance_ville" in diction.keys()):
new_soutenance_data['jury_soutenance_ville'] = str(diction['jury_soutenance_ville'])
else:
new_soutenance_data['jury_soutenance_ville'] = ""
if ("jury_soutenance_pays" in diction.keys()):
new_soutenance_data['jury_soutenance_pays'] = str(diction['jury_soutenance_pays'])
else:
new_soutenance_data['jury_soutenance_pays'] = ""
new_soutenance_data['date_update'] = str(datetime.now())
new_soutenance_data['update_by'] = str(my_partner['_id'])
ret_val2 = MYSY_GV.dbname['jury_soutenance'].find_one_and_update(
{'_id': ObjectId(str(diction['jury_soutenance_id'])),
'valide': '1',
'locked': '0',
'partner_owner_recid': str(my_partner['recid'])},
{"$set": new_soutenance_data},
return_document=ReturnDocument.AFTER,
upsert=False,
)
# Verfifier la validité de l'unité d'enseignement
@ -1790,6 +1896,8 @@ def Add_Update_Apprenant_To_Jury(diction):
new_data['agenda_id'] = str(agenda_inserted_id)
new_data['jury_soutenance_id'] = str(soutenance_inserted_id)
now = str(datetime.now())
mytoday = datetime.today()
new_data['date_ajout_jury'] = str(mytoday)
@ -1905,36 +2013,35 @@ def Get_Given_Jury_Apprenant_With_Filter(diction):
user['id'] = str(val_tmp)
val_tmp = val_tmp + 1
local_new_dict = {}
local_new_dict['token'] = diction['token']
local_new_dict['inscrit_id'] = retval['inscription_id']
local_inscrit_data_status, local_inscrit_data_retval = mycommon.Get_Inscrit_And_Apprenant_Data(
local_new_dict)
if (local_inscrit_data_status is False):
return local_inscrit_data_status, local_inscrit_data_retval
nom = ""
prenom = ""
email = ""
if(retval['inscription_id'] ):
local_new_dict = {}
local_new_dict['token'] = diction['token']
local_new_dict['inscrit_id'] = retval['inscription_id']
local_inscrit_data_status, local_inscrit_data_retval = mycommon.Get_Inscrit_And_Apprenant_Data(
local_new_dict)
if (local_inscrit_data_status is False):
return local_inscrit_data_status, local_inscrit_data_retval
if ("inscrit_data" in local_inscrit_data_retval.keys()):
user['inscrit_data'] = local_inscrit_data_retval['inscrit_data']
nom = local_inscrit_data_retval['inscrit_data']['nom']
prenom = local_inscrit_data_retval['inscrit_data']['prenom']
email = local_inscrit_data_retval['inscrit_data']['email']
if ("inscrit_data" in local_inscrit_data_retval.keys()):
user['inscrit_data'] = local_inscrit_data_retval['inscrit_data']
if ("apprenant_data" in local_inscrit_data_retval.keys()):
user['apprenant_data'] = local_inscrit_data_retval['apprenant_data']
nom = local_inscrit_data_retval['inscrit_data']['nom']
prenom = local_inscrit_data_retval['inscrit_data']['prenom']
email = local_inscrit_data_retval['inscrit_data']['email']
if ("apprenant_data" in local_inscrit_data_retval.keys()):
user['apprenant_data'] = local_inscrit_data_retval['apprenant_data']
# Si on a un dossier apprenant, alors on écrase les variables ci-dessous
nom = local_inscrit_data_retval['apprenant_data']['nom']
prenom = local_inscrit_data_retval['apprenant_data']['prenom']
email = local_inscrit_data_retval['apprenant_data']['email']
# Si on a un dossier apprenant, alors on écrase les variables ci-dessous
nom = local_inscrit_data_retval['apprenant_data']['nom']
prenom = local_inscrit_data_retval['apprenant_data']['prenom']
email = local_inscrit_data_retval['apprenant_data']['email']
user['nom'] = nom
@ -2072,7 +2179,11 @@ def Add_Update_Jury_Soutenance(diction):
Verification des input acceptés
"""
field_list = ['token', 'jury_id', 'jury_soutenance_id',
'agenda_id', 'sujet', 'note', 'observation']
'agenda_id', 'sujet', 'note', 'observation',
'jury_soutenance_salle',
'jury_soutenance_adresse', 'jury_soutenance_code_postal', 'jury_soutenance_ville',
'jury_soutenance_pays'
]
incom_keys = diction.keys()
for val in incom_keys:
@ -2146,8 +2257,10 @@ def Add_Update_Jury_Soutenance(diction):
my_token = str(diction['token'])
local_jury_soutenance_id = diction['jury_soutenance_id']
new_data = diction
del new_data['token']
del new_data['jury_soutenance_id']
new_data['valide'] = "1"
new_data['locked'] = "0"
@ -2156,7 +2269,7 @@ def Add_Update_Jury_Soutenance(diction):
new_data['date_update'] = str(datetime.now())
result = MYSY_GV.dbname['jury_soutenance'].find_one_and_update(
{'_id':ObjectId(str(diction['jury_soutenance_id'])),
{'_id':ObjectId(str(local_jury_soutenance_id)),
'jury_id':str(diction['jury_id']),
'partner_owner_recid':str(my_partner['recid'])
},
@ -2364,7 +2477,7 @@ def Get_Given_Jury_Soutenenace(diction):
"""
Verification des input acceptés
"""
field_list = ['token', 'jury_id', 'agenda_id']
field_list = ['token', 'jury_id', 'agenda_id', 'jury_soutenance_id']
incom_keys = diction.keys()
for val in incom_keys:
@ -2376,7 +2489,7 @@ def Get_Given_Jury_Soutenenace(diction):
"""
Verification des champs obligatoires
"""
field_list_obligatoire = ['token', 'jury_id', 'agenda_id']
field_list_obligatoire = ['token', 'jury_id', 'agenda_id', 'jury_soutenance_id']
for val in field_list_obligatoire:
if val not in diction:
mycommon.myprint(
@ -2402,7 +2515,7 @@ def Get_Given_Jury_Soutenenace(diction):
data_cle = {}
data_cle['partner_owner_recid'] = str(my_partner['recid'])
data_cle['valide'] = "1"
data_cle['agenda_id'] = str(diction['agenda_id'])
data_cle['_id'] = ObjectId(str(diction['jury_soutenance_id']))
data_cle['locked'] = "0"
RetObject = []
@ -2412,6 +2525,22 @@ def Get_Given_Jury_Soutenenace(diction):
user = retval
user['id'] = str(val_tmp)
if ("jury_soutenance_salle" not in retval.keys()):
user['jury_soutenance_salle'] = ""
if ("jury_soutenance_adresse" not in retval.keys()):
user['jury_soutenance_adresse'] = ""
if ("jury_soutenance_code_postal" not in retval.keys()):
user['jury_soutenance_code_postal'] = ""
if ("jury_soutenance_ville" not in retval.keys()):
user['jury_soutenance_ville'] = ""
if ("jury_soutenance_pays" not in retval.keys()):
user['jury_soutenance_pays'] = ""
if ("convocation_apprenant_send" not in retval.keys()):
user["convocation_apprenant_send"] = ""
@ -2655,8 +2784,10 @@ def Send_Jury_Apprenant_Soutenance_Convocation_By_PDF(diction):
'locked':'0',
'jury_soutenance_id':str(local_soutenance),
'partner_owner_recid':str(my_partner['recid'])}):
tab_soutenance_inscrit.append(str(tmp['inscription_id']))
if( tmp['inscription_id'] ):
tab_soutenance_inscrit.append(str(tmp['inscription_id']))
print(" ### tab_soutenance_inscrit = ", tab_soutenance_inscrit)
for val in tab_soutenance_inscrit:
local_diction = {}
@ -2666,6 +2797,7 @@ def Send_Jury_Apprenant_Soutenance_Convocation_By_PDF(diction):
local_diction['courrier_template_id'] = diction['courrier_template_id']
local_diction['inscription_id'] = str(val)
print(" ### local_diction === ", local_diction)
local_status, local_full_file_name = Create_Jury_Soutenance_Convocation_By_Inscrit_PDF(local_diction)
if( local_status is False):
return local_status, local_full_file_name
@ -2975,7 +3107,9 @@ def Send_Jury_Apprenant_Soutenance_Convocation_By_Email(tab_files, Folder, dicti
'locked':'0',
'jury_soutenance_id':str(local_soutenance),
'partner_owner_recid':str(my_partner['recid'])}):
tab_soutenance_inscrit.append(str(tmp['inscription_id']))
if( tmp['inscription_id'] ):
tab_soutenance_inscrit.append(str(tmp['inscription_id']))
for val in tab_soutenance_inscrit:
@ -3592,6 +3726,104 @@ def Create_Jury_Convocation_By_Membre_PDF(diction):
convention_dictionnary_data = local_retval
convention_dictionnary_data['hr_data'] = hr_data
"""
Recuperer les données du jury
"""
jury_data_node = {}
jury_data = MYSY_GV.dbname['jury'].find_one({'_id':ObjectId(str(diction['jury_id'])),
'valide':'1',
'locked':'0',
'partner_owner_recid':str(my_partner['recid'])})
if (jury_data and "code" in jury_data.keys()):
jury_data_node['code'] = jury_data['code']
else:
jury_data_node['code'] = ""
if (jury_data and "jury_salle" in jury_data.keys()):
jury_data_node['jury_salle'] = jury_data['jury_salle']
else:
jury_data_node['jury_salle'] = ""
if (jury_data and "adresse" in jury_data.keys()):
jury_data_node['adresse'] = jury_data['adresse']
else:
jury_data_node['adresse'] = ""
if (jury_data and "code_postal" in jury_data.keys()):
jury_data_node['code_postal'] = jury_data['code_postal']
else:
jury_data_node['code_postal'] = ""
if (jury_data and "ville" in jury_data.keys()):
jury_data_node['ville'] = jury_data['ville']
else:
jury_data_node['ville'] = ""
if (jury_data and "pays" in jury_data.keys()):
jury_data_node['pays'] = jury_data['pays']
else:
jury_data_node['pays'] = ""
convention_dictionnary_data['jury_data'] = jury_data_node
"""
Recuperer la liste des soutenances concernée par ce jury
"""
list_soutenance = []
for jury_apprenant_data in MYSY_GV.dbname['jury_apprenant'].find({'jury_id':diction['jury_id'],
'valide':'1',
'locked':'0',
'partner_owner_recid':str(my_partner['recid'])}):
local_node = {}
if( "agenda_id" in jury_apprenant_data and jury_apprenant_data['agenda_id']):
local_agenda_data = MYSY_GV.dbname['agenda'].find_one({ 'partner_owner_recid':str(my_partner['recid']),
'_id':ObjectId(str(jury_apprenant_data['agenda_id']))})
local_date = str(local_agenda_data['event_start'])[0:16]
new_date = datetime.strptime(str(local_date), '%Y-%m-%dT%H:%M').strftime("%d/%m/%Y %H:%M")
local_node['event_start'] = str(new_date)
local_date = str(local_agenda_data['event_end'])[0:16]
new_date = datetime.strptime(str(local_date), '%Y-%m-%dT%H:%M').strftime("%d/%m/%Y %H:%M")
local_node['event_end'] = str(new_date)
if ("inscription_id" in jury_apprenant_data and jury_apprenant_data['inscription_id']):
local_inscription_data = MYSY_GV.dbname['inscription'].find_one({'partner_owner_recid': str(my_partner['recid']),
'_id': ObjectId(str(jury_apprenant_data['inscription_id']))})
if( local_inscription_data and "nom" in local_inscription_data.keys() ):
local_node['nom'] = local_inscription_data['nom']
else:
local_node['nom'] = ""
if (local_inscription_data and "nom" in local_inscription_data.keys()):
local_node['prenom'] = local_inscription_data['prenom']
else:
local_node['prenom'] = ""
if (local_inscription_data and "nom" in local_inscription_data.keys()):
local_node['email'] = local_inscription_data['email']
else:
local_node['email'] = ""
if (local_inscription_data and "civilite" in local_inscription_data.keys()):
local_node['civilite'] = local_inscription_data['civilite']
else:
local_node['civilite'] = ""
list_soutenance.append(local_node)
#print(" #### list_soutenance = ", list_soutenance)
convention_dictionnary_data['list_soutenance'] = list_soutenance
body = {
"params": convention_dictionnary_data,
}

View File

@ -5207,26 +5207,79 @@ def Get_Dictionnary_data_For_Template(diction):
if ("sujet" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_sujet'] = jury_soutenance_data['sujet']
else:
new_jury_soutenance_data['jury_soutenance_sujet'] = ""
if ("observation" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_observation'] = jury_soutenance_data['observation']
new_jury_soutenance_data['observation'] = jury_soutenance_data['observation']
else:
new_jury_soutenance_data['observation'] = ""
if ("note" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_note'] = jury_soutenance_data['note']
else:
new_jury_soutenance_data['jury_soutenance_note'] = ""
if ("jury_soutenance_adresse" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_adresse'] = jury_soutenance_data['jury_soutenance_adresse']
else:
new_jury_soutenance_data['jury_soutenance_adresse'] = ""
if ("jury_soutenance_code_postal" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_code_postal'] = jury_soutenance_data['jury_soutenance_code_postal']
else:
new_jury_soutenance_data['jury_soutenance_code_postal'] = ""
if ("jury_soutenance_pays" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_pays'] = jury_soutenance_data['jury_soutenance_pays']
else:
new_jury_soutenance_data['jury_soutenance_pays'] = ""
if ("jury_soutenance_salle" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_salle'] = jury_soutenance_data['jury_soutenance_salle']
else:
new_jury_soutenance_data['jury_soutenance_salle'] = ""
if ("jury_soutenance_ville" in jury_soutenance_data.keys()):
new_jury_soutenance_data['jury_soutenance_ville'] = jury_soutenance_data['jury_soutenance_ville']
else:
new_jury_soutenance_data['jury_soutenance_ville'] = ""
if( "jury_collection" in jury_soutenance_data.keys() ):
if( "code" in jury_soutenance_data["jury_collection"][0].keys() ):
new_jury_soutenance_data['jury_code'] = jury_soutenance_data["jury_collection"][0]['code']
else:
new_jury_soutenance_data['jury_code'] = ""
if ("description" in jury_soutenance_data["jury_collection"][0].keys()):
new_jury_soutenance_data['jury_description'] = jury_soutenance_data["jury_collection"][0]['description']
else:
new_jury_soutenance_data['jury_description'] = ""
if ("agenda_collection" in jury_soutenance_data.keys()):
if ("event_start" in jury_soutenance_data["agenda_collection"][0].keys()):
new_jury_soutenance_data['jury_soutenance_event_start'] = jury_soutenance_data["agenda_collection"][0]['event_start']
if( jury_soutenance_data["agenda_collection"][0]['event_start'] ):
local_date = str( jury_soutenance_data["agenda_collection"][0]['event_start'])[0:16]
new_date = datetime.strptime(str(local_date ), '%Y-%m-%dT%H:%M').strftime( "%d/%m/%Y %H:%M")
new_jury_soutenance_data['event_start'] = str(new_date)
else:
new_jury_soutenance_data['event_start'] = ""
else:
new_jury_soutenance_data['event_start'] = ""
if ("event_end" in jury_soutenance_data["agenda_collection"][0].keys()):
new_jury_soutenance_data['jury_soutenance_event_end'] = jury_soutenance_data["agenda_collection"][0]['event_end']
if (jury_soutenance_data["agenda_collection"][0]['event_end']):
local_date = str(jury_soutenance_data["agenda_collection"][0]['event_end'])[0:16]
new_date = datetime.strptime(str(local_date), '%Y-%m-%dT%H:%M').strftime("%d/%m/%Y %H:%M")
new_jury_soutenance_data['event_end'] = str(new_date)
else:
new_jury_soutenance_data['event_end'] = ""
else:
new_jury_soutenance_data['event_end'] = ""