mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Fixed for creating Assistant in UserView
This commit is contained in:
parent
c98d85c810
commit
3b7c186baf
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ class UserView(SecureAdminModelView):
|
||||||
) # Password is automatically hashed with this method
|
) # Password is automatically hashed with this method
|
||||||
|
|
||||||
if model.has_role("assistant") and not model.assistant:
|
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)
|
assistant = Assistant(user=model, semester_experiments=semester_experiments)
|
||||||
self.session.add(assistant)
|
self.session.add(assistant)
|
||||||
|
|
Loading…
Reference in a new issue