mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Fixed weighting defaults
This commit is contained in:
parent
62c30001cd
commit
bd393796f5
1 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue