From d8e1c428b08d07701625ded4c9d4985843f5dbc4 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 1 Nov 2021 15:16:51 +0100 Subject: [PATCH] migrate_scodoc7_dept_archives (ajout du s au nom de la fonction) --- app/models/etudiants.py | 2 +- app/models/formsemestre.py | 2 +- scodoc.py | 4 ++-- tools/__init__.py | 2 +- tools/migrate_scodoc7_archives.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/etudiants.py b/app/models/etudiants.py index 2511f0ca..90733b85 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -41,7 +41,7 @@ class Identite(db.Model): code_nip = db.Column(db.Text()) code_ine = db.Column(db.Text()) # Ancien id ScoDoc7 pour les migrations de bases anciennes - # ne pas utiliser après migrate_scodoc7_dept_archive + # ne pas utiliser après migrate_scodoc7_dept_archives scodoc7_id = db.Column(db.Text(), nullable=True) # billets = db.relationship("BilletAbsence", backref="etudiant", lazy="dynamic") diff --git a/app/models/formsemestre.py b/app/models/formsemestre.py index 73830b06..94f0188f 100644 --- a/app/models/formsemestre.py +++ b/app/models/formsemestre.py @@ -79,7 +79,7 @@ class FormSemestre(db.Model): ) # Ancien id ScoDoc7 pour les migrations de bases anciennes - # ne pas utiliser après migrate_scodoc7_dept_archive + # ne pas utiliser après migrate_scodoc7_dept_archives scodoc7_id = db.Column(db.Text(), nullable=True) def __init__(self, **kwargs): diff --git a/scodoc.py b/scodoc.py index 3785dc6e..d15c3f7d 100755 --- a/scodoc.py +++ b/scodoc.py @@ -319,9 +319,9 @@ def import_scodoc7_dept(dept: str, dept_db_name: str = ""): # import-scodoc7-de @app.cli.command() @click.argument("dept", default="") @with_appcontext -def migrate_scodoc7_dept_archive(dept: str): # migrate-scodoc7-dept-archive +def migrate_scodoc7_dept_archives(dept: str): # migrate-scodoc7-dept-archives """Post-migration: renomme les archives en fonction des id de ScoDoc 9""" - tools.migrate_scodoc7_dept_archive(dept) + tools.migrate_scodoc7_dept_archives(dept) @app.cli.command() diff --git a/tools/__init__.py b/tools/__init__.py index 599bdf0d..7ed85cae 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -6,4 +6,4 @@ from tools.import_scodoc7_user_db import import_scodoc7_user_db from tools.import_scodoc7_dept import import_scodoc7_dept -from tools.migrate_scodoc7_archives import migrate_scodoc7_dept_archive +from tools.migrate_scodoc7_archives import migrate_scodoc7_dept_archives diff --git a/tools/migrate_scodoc7_archives.py b/tools/migrate_scodoc7_archives.py index 6e7553db..66f52bcd 100644 --- a/tools/migrate_scodoc7_archives.py +++ b/tools/migrate_scodoc7_archives.py @@ -11,7 +11,7 @@ from app.models.formsemestre import FormSemestre from app.models.etudiants import Identite -def migrate_scodoc7_dept_archive(dept_name=""): +def migrate_scodoc7_dept_archives(dept_name=""): if dept_name: depts = Departement.query.filter_by(acronym=dept_name) else: