forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -616,7 +616,7 @@ def assiduite_edit(assiduite_id: int):
|
||||
# Cas 3 : desc
|
||||
desc = data.get("desc", False)
|
||||
if desc is not False:
|
||||
assiduite_unique.desc = desc
|
||||
assiduite_unique.description = desc
|
||||
|
||||
# Cas 4 : est_just
|
||||
est_just = data.get("est_just")
|
||||
|
@ -53,7 +53,7 @@ class Assiduite(db.Model):
|
||||
)
|
||||
etat = db.Column(db.Integer, nullable=False)
|
||||
|
||||
desc = db.Column(db.Text)
|
||||
description = db.Column(db.Text)
|
||||
|
||||
entry_date = db.Column(db.DateTime(timezone=True), server_default=db.func.now())
|
||||
|
||||
@ -85,7 +85,7 @@ class Assiduite(db.Model):
|
||||
"date_debut": self.date_debut,
|
||||
"date_fin": self.date_fin,
|
||||
"etat": etat,
|
||||
"desc": self.desc,
|
||||
"desc": self.description,
|
||||
"entry_date": self.entry_date,
|
||||
"user_id": username,
|
||||
"est_just": self.est_just,
|
||||
@ -121,7 +121,7 @@ class Assiduite(db.Model):
|
||||
etat=etat,
|
||||
etudiant=etud,
|
||||
moduleimpl_id=moduleimpl.id,
|
||||
desc=description,
|
||||
description=description,
|
||||
entry_date=entry_date,
|
||||
user_id=user_id,
|
||||
est_just=est_just,
|
||||
@ -134,7 +134,7 @@ class Assiduite(db.Model):
|
||||
date_fin=date_fin,
|
||||
etat=etat,
|
||||
etudiant=etud,
|
||||
desc=description,
|
||||
description=description,
|
||||
entry_date=entry_date,
|
||||
user_id=user_id,
|
||||
est_just=est_just,
|
||||
@ -162,7 +162,7 @@ class Assiduite(db.Model):
|
||||
etat=etat,
|
||||
etudid=etudid,
|
||||
moduleimpl_id=moduleimpl_id,
|
||||
desc=description,
|
||||
description=description,
|
||||
entry_date=entry_date,
|
||||
est_just=est_just,
|
||||
)
|
||||
|
@ -0,0 +1,28 @@
|
||||
"""assiduites_champ_desc_description
|
||||
|
||||
Revision ID: 50f7e0b6229f
|
||||
Revises: b555390780b2
|
||||
Create Date: 2023-07-20 12:52:27.882303
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "50f7e0b6229f"
|
||||
down_revision = "b555390780b2"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column("assiduites", "desc", new_column_name="description")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column("assiduites", "description", new_column_name="desc")
|
||||
# ### end Alembic commands ###
|
@ -129,8 +129,8 @@ class _Merger:
|
||||
|
||||
_glob.cursor.execute(
|
||||
"""INSERT INTO assiduites
|
||||
(etudid,date_debut,date_fin,etat,moduleimpl_id,"desc",entry_date)
|
||||
VALUES (%(etudid)s,%(date_debut)s,%(date_fin)s,%(etat)s,%(moduleimpl_id)s,%(desc)s,%(entry_date)s)
|
||||
(etudid,date_debut,date_fin,etat,moduleimpl_id,"description",entry_date)
|
||||
VALUES (%(etudid)s,%(date_debut)s,%(date_fin)s,%(etat)s,%(moduleimpl_id)s,%(description)s,%(entry_date)s)
|
||||
""",
|
||||
{
|
||||
"etudid": self.etudid,
|
||||
@ -138,7 +138,7 @@ class _Merger:
|
||||
"date_fin": date_fin,
|
||||
"etat": EtatAssiduite.ABSENT,
|
||||
"moduleimpl_id": self.moduleimpl,
|
||||
"desc": self.raison,
|
||||
"description": self.raison,
|
||||
"entry_date": self.entry_date,
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user