From 87bcfc801a5f2e7acdc4bfa3cd06319e50c09216 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 17 Dec 2021 13:42:39 +0100 Subject: [PATCH] Fix: objects_renumber --- app/scodoc/sco_edit_formation.py | 2 +- app/scodoc/sco_groups.py | 2 +- app/scodoc/sco_utils.py | 2 +- sco_version.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_edit_formation.py b/app/scodoc/sco_edit_formation.py index 050623ec1a..bab913c64a 100644 --- a/app/scodoc/sco_edit_formation.py +++ b/app/scodoc/sco_edit_formation.py @@ -326,7 +326,7 @@ def module_move(module_id, after=0, redirect=True): modules = query.order_by(Module.numero, Module.code).all() if len({o.numero for o in modules}) != len(modules): # il y a des numeros identiques ! - scu.objects_renumber(modules) + scu.objects_renumber(db, modules) if len(modules) > 1: idx = [m.id for m in modules].index(module.id) neigh = None # object to swap with diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index 7a74140126..cfd3319687 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -1068,7 +1068,7 @@ def partition_move(partition_id, after=0, redirect=1): ) if len({o.numero for o in objs}) != len(objs): # il y a des numeros identiques ! - scu.objects_renumber(objs) + scu.objects_renumber(db, objs) if len(others) > 1: pidx = [p["partition_id"] for p in others].index(partition_id) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index dfb9946d8d..35d13cbf32 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -992,7 +992,7 @@ def confirm_dialog( return "\n".join(H) -def objects_renumber(obj_list) -> None: +def objects_renumber(db, obj_list) -> None: """fixe les numeros des objets d'une liste de modèles pour ne pas changer son ordre""" log(f"objects_renumber {obj_list}") diff --git a/sco_version.py b/sco_version.py index 71c0c9022e..cdee3253ec 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.9" +SCOVERSION = "9.1.10" SCONAME = "ScoDoc"