mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Require active_semester
This commit is contained in:
parent
e71d711090
commit
2236edb8aa
3 changed files with 5 additions and 2 deletions
|
@ -148,8 +148,7 @@ class UserView(SecureAdminModelView):
|
|||
active_semester = QuerySelectField(
|
||||
"Active Semester",
|
||||
query_factory=semesterQueryFactory,
|
||||
allow_blank=True,
|
||||
blank_text="-",
|
||||
validators=[DataRequired()],
|
||||
default=lastSemester,
|
||||
description="Not fixed and users (including assistants) can change it.",
|
||||
)
|
||||
|
|
|
@ -69,6 +69,7 @@ def main():
|
|||
mobile_phone_number=admin_mobile_phone_number.strip() or None,
|
||||
building=admin_building.strip() or None,
|
||||
room=admin_room.strip() or None,
|
||||
active_semester=semester,
|
||||
)
|
||||
|
||||
admin = Admin(user=admin_user)
|
||||
|
|
|
@ -107,6 +107,7 @@ def main():
|
|||
roles=[adminRole],
|
||||
first_name="Peter",
|
||||
last_name="Blümler",
|
||||
active_semester=sem2,
|
||||
)
|
||||
|
||||
admin = Admin(user=admin_user)
|
||||
|
@ -121,6 +122,7 @@ def main():
|
|||
last_name="l",
|
||||
phone_number="012333212",
|
||||
mobile_phone_number="012334123",
|
||||
active_semester=sem2,
|
||||
)
|
||||
us2 = user_datastore.create_user(
|
||||
email="test2@protonmail.com",
|
||||
|
@ -128,6 +130,7 @@ def main():
|
|||
roles=[assistantRole],
|
||||
first_name="As2",
|
||||
last_name="l",
|
||||
active_semester=sem2,
|
||||
)
|
||||
|
||||
as1 = Assistant(user=us1)
|
||||
|
|
Loading…
Reference in a new issue