Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 8652ef2e7b - Show all commits

View File

@ -311,6 +311,13 @@ def group_create(partition_id: int): # partition-group-create
args["group_name"] = args["group_name"].strip() args["group_name"] = args["group_name"].strip()
if not GroupDescr.check_name(partition, args["group_name"]): if not GroupDescr.check_name(partition, args["group_name"]):
return json_error(API_CLIENT_ERROR, "invalid 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 args["partition_id"] = partition_id
try: try:
group = GroupDescr(**args) group = GroupDescr(**args)

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.6.87" SCOVERSION = "9.6.88"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"