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

Restricted semester label to WS and SS

This commit is contained in:
Mo 2021-07-30 00:43:05 +02:00
parent ba0691015d
commit 6036500f2a

View file

@ -351,6 +351,9 @@ class Semester(db.Model):
__table_args__ = (db.UniqueConstraint(label, year),)
def customInit(label, year, oldSemester, transferParts, transferAssistants):
if label not in ("WS", "SS"):
raise DataBaseException("The semester label has to be WS or SS!")
semester = Semester(label=label, year=year)
if transferParts: