1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-09-19 18:31:16 +00:00

Fixed weighting defaults

This commit is contained in:
Mo 2021-08-18 18:58:20 +02:00
parent 62c30001cd
commit bd393796f5

View file

@ -192,12 +192,17 @@ class Experiment(db.Model):
active = db.Column(db.Boolean, default=True, nullable=False)
oral_weighting = db.Column(
db.Float, db.CheckConstraint("oral_weighting >= 0"), db.CheckConstraint("oral_weighting <= 1"), nullable=False
db.Float,
db.CheckConstraint("oral_weighting >= 0"),
db.CheckConstraint("oral_weighting <= 1"),
default=0.5,
nullable=False,
)
protocol_weighting = db.Column(
db.Float,
db.CheckConstraint("protocol_weighting >= 0"),
db.CheckConstraint("protocol_weighting <= 1"),
default=0.5,
nullable=False,
)
final_weighting = db.Column(
@ -399,14 +404,12 @@ class ExperimentMark(db.Model):
db.Integer,
db.CheckConstraint("oral_mark > -1"),
db.CheckConstraint("oral_mark < 16"),
default=0.5,
nullable=True,
)
protocol_mark = db.Column(
db.Integer,
db.CheckConstraint("protocol_mark > -1"),
db.CheckConstraint("protocol_mark < 16"),
default=0.5,
nullable=True,
)