1
0
forked from ScoDoc/ScoDoc

migrate_scodoc7_dept_archives (ajout du s au nom de la fonction)

This commit is contained in:
Emmanuel Viennet 2021-11-01 15:16:51 +01:00
parent 4fc31d8b47
commit d8e1c428b0
5 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@ class Identite(db.Model):
code_nip = db.Column(db.Text()) code_nip = db.Column(db.Text())
code_ine = db.Column(db.Text()) code_ine = db.Column(db.Text())
# Ancien id ScoDoc7 pour les migrations de bases anciennes # 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) scodoc7_id = db.Column(db.Text(), nullable=True)
# #
billets = db.relationship("BilletAbsence", backref="etudiant", lazy="dynamic") billets = db.relationship("BilletAbsence", backref="etudiant", lazy="dynamic")

View File

@ -79,7 +79,7 @@ class FormSemestre(db.Model):
) )
# Ancien id ScoDoc7 pour les migrations de bases anciennes # 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) scodoc7_id = db.Column(db.Text(), nullable=True)
def __init__(self, **kwargs): def __init__(self, **kwargs):

View File

@ -319,9 +319,9 @@ def import_scodoc7_dept(dept: str, dept_db_name: str = ""): # import-scodoc7-de
@app.cli.command() @app.cli.command()
@click.argument("dept", default="") @click.argument("dept", default="")
@with_appcontext @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""" """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() @app.cli.command()

View File

@ -6,4 +6,4 @@
from tools.import_scodoc7_user_db import import_scodoc7_user_db from tools.import_scodoc7_user_db import import_scodoc7_user_db
from tools.import_scodoc7_dept import import_scodoc7_dept 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

View File

@ -11,7 +11,7 @@ from app.models.formsemestre import FormSemestre
from app.models.etudiants import Identite from app.models.etudiants import Identite
def migrate_scodoc7_dept_archive(dept_name=""): def migrate_scodoc7_dept_archives(dept_name=""):
if dept_name: if dept_name:
depts = Departement.query.filter_by(acronym=dept_name) depts = Departement.query.filter_by(acronym=dept_name)
else: else: