Skip to content
Snippets Groups Projects
Commit e6e0b9a8 authored by Jonathan Seguin's avatar Jonathan Seguin
Browse files

Fix for users logging in without lab association

parent 9b7d948c
Branches 162-rm-dependence-to-python2
No related tags found
No related merge requests found
......@@ -28,5 +28,6 @@ class LoginSuccess(View):
return redirect('pi.dashboard')
else:
request.session['active_lab_id'] = user.profile.labs.all()[0].id
if user.profiles.labs.exists():
request.session['active_lab_id'] = user.profile.labs.first().id
return redirect('dashboard')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment