Skip to content
Snippets Groups Projects
Commit a2c8b851 authored by Paul Milleville's avatar Paul Milleville
Browse files

Fix bug controle création

parent f189f9cd
No related branches found
No related tags found
No related merge requests found
......@@ -270,17 +270,20 @@ def formsemestre_synchro_etuds(
list_partition = sco_groups.get_partitions_list(formsemestre_id=formsemestre_id)
# Vérifie si une partition avec le nom "Groupe Apogée" existe déjà
partition_id =None
partition_exists = False
for partition in partitions:
for partition in list_partition:
if partition['partition_name'] == 'Groupe Apogée':
partition_exists = True
partition_id = partition['partition_id']
break # La partition existe déjà, on peut arrêter la recherche
# Si la partition n'existe pas, on la crée
if not partition_exists:
formsemestre_id = 1031 # Remplace cette valeur si nécessaire
# Appel à la méthode de création de partition
sco_groups.partition_create(formsemestre_id=formsemestre_id, partition_name="Groupe Apogée")
print(partition_id)
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment