diff --git a/app/api/partitions.py b/app/api/partitions.py index 50660fb66..7b47c3148 100644 --- a/app/api/partitions.py +++ b/app/api/partitions.py @@ -311,6 +311,13 @@ def group_create(partition_id: int): # partition-group-create args["group_name"] = args["group_name"].strip() if not GroupDescr.check_name(partition, args["group_name"]): return json_error(API_CLIENT_ERROR, "invalid group_name") + + # le numero est optionnel + numero = args.get("numero") + if numero is None: + numeros = [gr.numero or 0 for gr in partition.groups] + numero = (max(numeros) + 1) if numeros else 0 + args["numero"] = numero args["partition_id"] = partition_id try: group = GroupDescr(**args) diff --git a/sco_version.py b/sco_version.py index ebe54b06f..35a788bfb 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.87" +SCOVERSION = "9.6.88" SCONAME = "ScoDoc"