1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Use session.get

This commit is contained in:
Mo 2022-05-16 17:17:11 +02:00
parent 3022c377b4
commit 4332e145b7

View file

@ -447,6 +447,8 @@ class Semester(db.Model):
__table_args__ = (db.UniqueConstraint(label, year),) __table_args__ = (db.UniqueConstraint(label, year),)
# TODO: def __init__(self, label, year):
def initFromOldSemester(label, year, oldSemester, transferParts, transferAssistants): def initFromOldSemester(label, year, oldSemester, transferParts, transferAssistants):
semester = Semester(label=label, year=year) semester = Semester(label=label, year=year)
@ -482,7 +484,7 @@ class ExperimentMark(db.Model):
def final_experiment_mark_update(context): def final_experiment_mark_update(context):
params = context.get_current_parameters() params = context.get_current_parameters()
experimentMark = ExperimentMark.query.get(params["experiment_mark_id"]) experimentMark = db.session.get(ExperimentMark, params["experiment_mark_id"])
oral_mark = params.get("oral_mark") oral_mark = params.get("oral_mark")
if oral_mark is None: if oral_mark is None: