mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Restricted semester label to WS and SS
This commit is contained in:
parent
ba0691015d
commit
6036500f2a
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue