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

Make active_semester_id not nullable

This commit is contained in:
Mo 2022-05-29 18:44:30 +02:00
parent 24c9f44b25
commit 06dd33fb55
2 changed files with 2 additions and 2 deletions

View file

@ -581,7 +581,7 @@ class User(db.Model, FsUserMixin):
building = db.Column(db.String(100), nullable=True) building = db.Column(db.String(100), nullable=True)
room = db.Column(db.String(100), nullable=True) room = db.Column(db.String(100), nullable=True)
active_semester_id = db.Column(db.Integer, db.ForeignKey("semester.id"), nullable=True) active_semester_id = db.Column(db.Integer, db.ForeignKey("semester.id"), nullable=False)
active_semester = db.relationship("Semester", back_populates="active_users") active_semester = db.relationship("Semester", back_populates="active_users")
admin = db.relationship("Admin", back_populates="user", lazy=False, uselist=False) admin = db.relationship("Admin", back_populates="user", lazy=False, uselist=False)

File diff suppressed because one or more lines are too long