1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-04 22:40:30 +00:00

Only allow to choose semesters not done for assistants

This commit is contained in:
Mo 2022-09-16 23:01:17 +02:00
parent 56cedaa308
commit 6dd02d3fbc

View file

@ -189,7 +189,7 @@ class AssistantUserView(SecureAssistantModelView):
@staticmethod
def semesterQueryFactory():
# Show only last two semesters to assistants
return Semester.query.order_by(Semester.id.desc()).limit(2)
return Semester.query.order_by(Semester.id.desc()).limit(2).where(Semester.done == False)
active_semester = QuerySelectField(
"Active Semester",