mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Only allow to choose semesters not done for assistants
This commit is contained in:
parent
56cedaa308
commit
6dd02d3fbc
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ class AssistantUserView(SecureAssistantModelView):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def semesterQueryFactory():
|
def semesterQueryFactory():
|
||||||
# Show only last two semesters to assistants
|
# 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 = QuerySelectField(
|
||||||
"Active Semester",
|
"Active Semester",
|
||||||
|
|
Loading…
Reference in a new issue