mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Fix max mark constraint
This commit is contained in:
parent
0ee5fcd52b
commit
e891fe4050
1 changed files with 3 additions and 3 deletions
|
@ -501,20 +501,20 @@ class ExperimentMark(db.Model):
|
|||
oral_mark = db.Column(
|
||||
db.Integer,
|
||||
db.CheckConstraint(f"oral_mark >= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MAX_MARK}"),
|
||||
nullable=True,
|
||||
)
|
||||
protocol_mark = db.Column(
|
||||
db.Integer,
|
||||
db.CheckConstraint(f"oral_mark >= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MAX_MARK}"),
|
||||
nullable=True,
|
||||
)
|
||||
|
||||
final_experiment_mark = db.Column(
|
||||
db.Integer,
|
||||
db.CheckConstraint(f"oral_mark >= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MIN_MARK}"),
|
||||
db.CheckConstraint(f"oral_mark <= {MAX_MARK}"),
|
||||
onupdate=final_experiment_mark_update,
|
||||
nullable=True,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue