1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Fixed for creating Assistant in UserView

This commit is contained in:
Mo 2021-08-21 23:21:39 +02:00
parent c98d85c810
commit 3b7c186baf

View file

@ -174,7 +174,7 @@ class UserView(SecureAdminModelView):
) # Password is automatically hashed with this method
if model.has_role("assistant") and not model.assistant:
semester_experiments = form.semester_experiments.data if form.semester_experiments else None
semester_experiments = form.semester_experiments.data if form.semester_experiments else []
assistant = Assistant(user=model, semester_experiments=semester_experiments)
self.session.add(assistant)