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

controle de création de la partition

parent aa614c53
No related branches found
No related tags found
No related merge requests found
...@@ -269,16 +269,18 @@ def formsemestre_synchro_etuds( ...@@ -269,16 +269,18 @@ def formsemestre_synchro_etuds(
list_partition = sco_groups.get_partitions_list(formsemestre_id=formsemestre_id) list_partition = sco_groups.get_partitions_list(formsemestre_id=formsemestre_id)
partition_id = None # Vérifie si une partition avec le nom "Groupe Apogée" existe déjà
for partition in list_partition: partition_exists = False
for partition in partitions:
if partition['partition_name'] == 'Groupe Apogée': if partition['partition_name'] == 'Groupe Apogée':
partition_id = partition['partition_id'] partition_exists = True
break break # La partition existe déjà, on peut arrêter la recherche
print(partition_id) # Si la partition n'existe pas, on la crée
if not partition_exists:
formsemestre_id = 1031 # Remplace cette valeur si nécessaire
sco_groups.partition_create(formsemestre_id=formsemestre_id,partition_name="Groupe Apogée") # Appel à la méthode de création de partition
sco_groups.partition_create(formsemestre_id=formsemestre_id, partition_name="Groupe Apogée")
# #
......
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